Tuesday 4 November 2014

The Dragon Inscriber


For one of my specialization courses, Robotics, we had a group project in which we were given a kit, Robix, and asked to build something.

Out group built a simple arm and tasked it to write Chinese characters. All the programming was done by the software we downloaded from the official website.

Due to the software, we were spared reverse kinematics calculations.

A short clip of it in motion.


Monday 27 October 2014

Some Updates...




Soldering...
Made a mistake with this. The stiffness of the wires are much more
 than that of the metal on the motor...it broke off later.

The motors and joystick have all been soldered. However I am currently too busy to work on them. Will try to wrap them up in December.

Tachometer check....

This was damaged...maybe during soldering. I re-soldered to try and realign everything.
Searched online and realized I should have used the breadboard while soldering to
align everything.

Drew with a black marker initially but that did not work so had
to use black tape everywhere.

Tachometer #1 reading the diskbrake...

#2 reading the motor.
Used some scrap metal to hold it in place.

Tested my tachometer code on the older car. The rpm seemed consistent for the motor but the wheel one was jumping wildly. Later I realized it was because the holes on the disk brake are very random.

Monday 15 September 2014

Installing Ubuntu


Since last week my laptop has been on life support. My last chance of saving it might be a clean installation of the OS but I would have to back up all my files before I do that. Thus this week I brought my old house computer, which was in storage, to school. The monitor, keyboard and mouse were already here, for use with the RPi so I just had to bring in my CPU. Not wanting to use Windows as the OS I had burnt a Ubuntu 32bit installer on one of my flash drives using my house computer before hand.

For some reason there appeared to be a hidden drive that I was not aware of, running Windows XP. And it was twice the size of my main drive(80gb)!I was trying to remember if I had partitioned the computer before but could not remember doing so. And they appeared as two separate hard disks, not separate partitions. Ubuntu was prompting me to choose one to install over. I decided to investigate.

 
 This was the culprit. A small hard disk that I had savaged from a netbook that someone had thrown away. I had forgotten that I had connected it to this computer. I decided to leave it there for now, might use it for an upcoming hack I have in mind.


 And tadaa! My PC set up with Ubuntu! Ready to roll! If you are wondering why I chose Ubuntu over the other distributions; well I decided I had to start somewhere, why not here.

Currently I am having some issues. Online lectures are not playing and lan connection is not detected. Right now I am resolving the video issue and using a wifi dongle. Will look into the other issue when time permits and hopefully get around to customizing the OS.


Monday 8 September 2014

Shopping Spree

Went on a shopping spree the past few days as preparation for two projects.

First project will be based on arduino. I got inspired after reading about a ballbot, so I will be doing a simpler version, a two wheel balancing robot. I did not get any battery pack for the robot, hopefully can find something lying around else will have to go down to sim lim tower. As for the body of the robot I will try to use two plastic sheets. Will visit one or two labs and check out their waste materials.

Second one will be a raspberry pi arcade gaming machine. The parts for this were rather expensive. I found a gamepad made for PS1/PS2 on Carousell for cheap and wanted to try and use parts from it but the seller did not reply for a few days. Only after I ordered the joystick he replied. Will not be getting it although I was looking forward to opening it up. I will be using my old monitor as the screen as it even has built in speakers. However it only has VGA input hence I ordered a HDMI-VGA adaptor.

Sunday 17 August 2014

Summary of Nao

A photo I took for the Graduation book (2014)

While I was with Team Nanyang (Robocup) I got exposed to Ubuntu and Python, learnt how to use Terminal to run scripts and transfer files and also learnt how to use Choregraphe, a software made for the Nao Robot. While the team disassembled before we could work on the soccer aspect, we did put together a dance for EEE night.


Enjoy the video!

Durian Kong

Last semester I had a semester long project with 7 other randomly selected students. After much brainstorming we settled on an idea of Durian Opener.

My part in the project included using SolidWorks to come up with some parts of the device, lasing with the technicians as well as coming up with the poster. Initially the poster was supposed to be done by another group member but because she got into an accident I took over with 2 days left to the deadline. I'm quite proud of the posters as I had no prior knowledge of Photoshop and got it done in two days by using resources such as YouTube.

The device could not be manufactured in school due to it's complexity so we outsourced the manufacturing portion to China.

Here are some photos of the complete device and the poster as well.





Fruit of our labor!
Before the test
Successful test!
 



The two posters and the product are currently on display in the engineering library at NTU!

Thursday 14 August 2014

Tachometer Trouble



Someone passed me a Tachometer to test. So I got a code from the web and modified it to suit my needs. Then I wanted to test it but could not as the infrared sensors were not workings. I would go to the lab tomorrow and use the multimeter to find out where the problem lies. 

I really wish to learn how to build the tachometer myself. I should also buy a screwdriver. Had to improvise by using cutting out a small piece of a can.

Monday 21 July 2014

Post Hackathon

The Code Extreme Hackathon is over. Was a very good experience. The only problem was that I was very tired from reservist. Think I might have slept the most.
My group made an eBasket.

Got a chance to test most of the things I bought the other time. All work well.




Sunday 22 June 2014

Testing the voltage/current reader

Was trying to find a way to find out my Pi's IP address without connecting it to a monitor(failed for today) so I took out the current/voltage reader. The current shows only .3A so I'm not sure how accurate it is. Later I will plug my phone in and compare the values with an app on my phone. The voltage hovers slightly above 5v. 






The color is slightly different. Have not tested any code yet.



Friday 20 June 2014

Online Learning

I have started doing an online course at Udaciy called "Intro to Computer Science".
I took it as it said we will learn how to build our own search engine and social network site which I thought was quite cool. I am currently midway into lesson one and so far it is really really basic Python introduction.

I knew if I take it alone I would probably drop out halfway. So I roped up a couple of friends to do it with me. Let's see how many of us complete it.

I have created a forum for us to discuss our questions at. It is at the following url: http://kaho.freeforums.org/

Arrival of my Arduino Clone

Came home today to see my items had arrive! I will test them another day and upload the results.


I can see not everything is aligned proper.
The breadboards are much smaller than I anticipated.
The bottom part has double-sided tape attached.





Wednesday 18 June 2014

The increasing power of the tablet

I finally started using my bluetooth keyboard and it really increases my productivity on the tablet, at least when working at my desk. I also tried using a mouse using my OTG adaptor but I think I prefer the touch input. I tried looking for games which had the option of using the keyboard as input but I was unable to find any. 

I did find an Arduino IDE! It can not only compile the code but also send it to your Arduino using OTG! Unfortunately my Uno is at home so I could not test he last part but I did download the code and tested compiling on it.

This is the app name and publisher


The app
Can you spot the error(s)?

The compiler sure did!

There was also an option to purchase this.
Basically it helps you "autocomplete", like ecplise.
 If I use this app for my arduino coding I might get it.

So this basically means that I no longer have to lug my Mac around just for my Arduino. I can simply carry my NotePro now! =D

Saturday 14 June 2014

Wild instructor appeared!

So yesterday I went for the Jam. There weren't any projects shown but it was an excellent chance to meet many other pi enthusiasts. I also met the founder and president of SUTD Makers club.

Today I went for the Raspberry Training. I learnt two new things. Firstly is that it is possible to view the gui  after you ssh into the pi. I have to try that when I get back my Pi. The second is booting up a program using a system you ssh-ed into and having it show the program in the system you are using.

A very pleasant surprise was when my course instructor Mr.Harish Pillay walked in! Well it happens he is organising the competition. Tomorrow is the last date for registration, I am desperately trying to find someone to join with.

Thursday 12 June 2014

Raspberry jam Event

On Friday evening I am going for an event called "Raspberry Jam SG #8". Not exactly sure what to expect, perhaps some people would be demonstrating some projects they worked on and at the very least it would be a good opportunity to meet fellow enthusiasts.

I have also signed up for this course called "code::XtremeApps:: 2014 Raspberry Pi Training". This is on Saturday and by the looks of it it is actually for absolute beginners who do not even know how to load an OS. Well it is free and I do not see a harm in going for it, who knows I might learn something I did not know previously and once again, a good chance to meet other makers.

Good deals (hopefully) from China

After weeks of pure software programming I am looking forward to doing some hands on.
I have an Arduino Uno at home and yesterday I went online to get a motor shield and 4 motors to make a quadcopter. However each motor itself was $30 and so I decided to start on a cheaper project instead. I ended up ordering some items from the website DealExtreme.


Here is what I bought. The prices are in USD:
HC-SR04 Ultrasonic Sensor Distance Measuring Module-133696


4 US$ 9.96
UNO R3 Development Board Microcontroller MEGA328P ATMEGA16U2 Compat for Arduino - Blue + Black-215600


1 US$ 12.23
USB-AV USB Power Current Voltage Tester - Translucent Blue + Silver -235090


1 US$ 4.44
170 Points Mini Breadboard for Arduino Proto Shield (Works with Official Arduino Boards / 6 PCS)-148870


1 US$ 5.42

And here is the price of the items or original (if available) items in Singapore:

Ultrasonic Sensor                              :S$58.50    <SGbotics>
Arduino Uno R3                               :S$32.70    <SGbotics>
170 Points Mini Breadboard (1 Piece) :S$2.90      <SGbotics>
USB Power Curent Voltage Tester      :S$15.90    <Qoo10>


While the items are cheaper, you have to remember they are clones. For the Arduino Uno clone and the Ultrasonic sensor clone I would run some tests and post their results once I get them on hand.

As for the USB Current/Voltage reader, I spent 2 hours on Sunday hunting in Sim Lim Square and Sim Lim Tower for it but could not find it. So am quite happy to get it at that price. 

If the Arduino clone works without issues it will definitely be the board being tested on in the future, especially if flight is involved.

Fruit Tree SG

In June 2014 I took a course called Open Source Technologies during special semester. I had to do a project for it in which I decided to make an app. Everyone else decided to use Arduino for their projects. As I already had experience with Arduino, to make the project more challenging, I decided to try something new. Thus I decided to make an Android app. Fruit Tree SG is the name of the app I created.

Prior to this I knew C and C++ so Java was not very alien. I used online resources such as Youtube, Github, Stack Overflow and Google to get the project done in a couple of weeks. From having zero knowledge of app development to publishing a fully working app; I can say this project really levelled me up!

The purpose of the app is to engage citizens to help map the fruiting trees of Singapore.
However the bigger picture is that the source code can be easily modified to suit any crowded source data collection projects. For example citizens submitting mosquito breeding areas. Backpackers logging their progress for their families to follow.

 












It might be simple but I am proud of it!

The app is not perfect yet. I am on the look out for people to join in on the project.

Future development:
-Finding an alternative place to host the data
-Allowing users to upload photos with the markers
-Implementing a reporting system for bugs or wrongly planted markers
-Adding a marker which allows users to mark fruits which are not present in the menu and state their name

Wednesday 11 June 2014

We are now LIVE with v1.0

Although there are still some objectives not met yet, I am naming this release v1.0 as the database would not be going live. No more test data and no more clearing the data. What you plot would be what you see.

This time I shall host at Dropbox as well as at Github.

We are now LIVE!

APK File: https://www.dropbox.com/s/s68ip7clr9fjgso/Fruit3SG.apk

User Manual:  https://www.dropbox.com/s/v5q08aa3h369kjx/Crowd%20Soursed%20Data%20Collection%20Manual.pdf

ChangeLog: https://www.dropbox.com/s/4pw1mf4zu2p36p5/Fruit3Sg_ChangeLog.rtf

Source Code: https://www.dropbox.com/s/n0vqb6caa6vm10q/Fruit%20Tree%20SG%20Source%20Code.zip

GitHub: https://github.com/Ashwani001/Crowd-Sourced-Data-Collection-


Get the data here:
Data in Webpage: https://docs.google.com/spreadsheet/pub?key=0ApvqX5TtdVUIdGdDU3NWbms4Tm1PT3VVUk9Ya0hYUkE&single=true&gid=0&output=html

Data in CSV Format: https://docs.google.com/spreadsheet/pub?key=0ApvqX5TtdVUIdGdDU3NWbms4Tm1PT3VVUk9Ya0hYUkE&single=true&gid=0&output=csv

Data in Plain Text: https://docs.google.com/spreadsheet/pub?key=0ApvqX5TtdVUIdGdDU3NWbms4Tm1PT3VVUk9Ya0hYUkE&single=true&gid=0&output=txt

Data in PDF: https://docs.google.com/spreadsheet/pub?key=0ApvqX5TtdVUIdGdDU3NWbms4Tm1PT3VVUk9Ya0hYUkE&single=true&gid=0&output=pdf

Data in ATOM: https://spreadsheets.google.com/feeds/list/0ApvqX5TtdVUIdGdDU3NWbms4Tm1PT3VVUk9Ya0hYUkE/od6/public/basic




Saturday 7 June 2014

Breakthrough with v0.7

Finally I managed to load the markers on start up.
Was so happy to see the fruits on the map!
The jump between version 0.6 and 0.7 was the greatest so far; in terms of lines of code added AND how much I learnt.


I had to modify the way I was uploading data. Spot the difference?





However one problem is that the current markers take awhile to load.



ChangeLog: https://www.dropbox.com/s/4pw1mf4zu2p36p5/Fruit3Sg_ChangeLog.rtf
APK File: https://www.dropbox.com/s/tbx1m40mvm8tb9o/Fruit-3SG-v0.7.apk
Source Code: https://www.dropbox.com/s/e38kswp2lj3p7qb/FruitTreeSG-v0.7-SourceCode.zip

PLEASE NOTE: Will no longer be hosting files on dropbox from next version. Follow my project on Github: https://github.com/Ashwani001/Crowd-Sourced-Data-Collection-

Friday 6 June 2014

The Curse of the 80:20

From Wednesday about 9pm till now, Friday 8.13am, I spent most of my waking time working on the code to import the data fro my spreadsheet to eclipse. The problem was that they recently changed the API, they dropped support for Spreadsheets API and now use Drive API. And ALL the examples out there are for the older API. Even a video done by google employees themselves could not help me. This time I looked for help on StackOverflow again but unfortunately it was not answer.

This could very well be the issue that brings the project to a halt( well without this there would be countless godzilian duplicate entries.

Right now I MIGHT have reached a breakthrough. No promises yet. But I am finally importing the data in a format which I COULD be able to use.

Notice the data starting from TIMESTAMP.


Well for now I need some sleep. Hopefully when I wake up I would be able to think more clearly.


Tuesday 3 June 2014

v0.6

Lo and behold!
Google ID captured, address reversed engineered from the Lat&Lng.
Now the main thing left is loading the markers with information from column C&D.
After that will be able to work out the smaller details (including the GPS problem, still have not gotten around to fixing it).
IF time permits might be able to launch a browser version for viewing as well.


ChangeLog: https://www.dropbox.com/s/4pw1mf4zu2p36p5/Fruit3Sg_ChangeLog.rtf
APK File: https://www.dropbox.com/s/zco9te53f9bew4s/Fruit3SG-v0.6.apk
Source Code: https://www.dropbox.com/s/5vk2bssiplc5xjr/FruitTreeSG-v0.6-sourcecode.zip

Monday 2 June 2014

v0.5

Turns out the code I got from GitHub was very well written and very well documented as well.
What I spent about 5 hours trying to do on Saturday I did within 5 mins with this code.
Will still have to learn about AsyncTask another time.

Currently it only records the location and fruit name. Date and time are auto recorded by default.




ChangeLog: 
https://www.dropbox.com/s/4pw1mf4zu2p36p5/Fruit3Sg_ChangeLog.rtf
APK: https://www.dropbox.com/s/sa3hlj8lv78ds1g/Fruit3SG-v0.5.apk
Source Code: https://www.dropbox.com/s/bztw95ah3k8a4z7/FruitTreeSG-v0.5-sourcecode.zip


Please note all previous versions have been moved. From now onwards only the latest version will be available. If anyone requires an older version feel free to leave a comment and I will make it available.

Sunday 1 June 2014

Async Headache

Yesterday I tried to upload the submitted data to a spreadsheet. I got the Http Request file off StackOverflow. However five hours later I could not get it to work. The problem was,  from what I understand, that Android does not allow you to do anything that takes too long on the main thread.
They have this thing called AsyncTask which is supposed to help you handle multiple threads. However I found it hard to use. After I wrote the code for it for some reason I was unable to execute it. It kept asking me to pass in a variable although I had not defined it to take in any variables.
I scrapped my code for the AsyncTask and looked through GitHub for a ready made one. I found some code for uploading data to a spreadsheet. It does not appear to look AsyncTask, I hope it was not made for an older version of Android.
I will continue work on it on Wednesday now.

Saturday 31 May 2014

With v0.4 comes an almost completed UI


Quite happy with my work tonight. Achieved what I wanted to. Took longer than expected though.
So the 3 previous buttons that I added now change the icon that the user can plant. I have also added a 4th button which lets user toggle the viewing mood. I spent quite awhile on this as previously I had worked with menu, this time it was image button and they both work sightly differently.
But the good news is that users can toggle between the fruits as many times as they need to; from mango to durian to mango to viewing mood etc . It will work.
Also, while users had to press back button after selecting fruit previously, it now returns by itself.
























It might be awhile before the next version is out. Now the basic user interface of the app is settled.
Next area I would have to work on is the flow of data. Where will the data be hosted? How to import&export data between an Android device and a spreadsheet? What sort of information do I need to capture? And another big issue, which I might not be able to add for version 1 of the app, is attaching photos to the markers. 

I think sending data from the app to the spreadsheet will be easy, I should be able to tap into google form. The harder part might be accessing the data to form the map if the spreadsheet is private. I plan to make it private so as to prevent people from deleting things. The data will be available for everyone to view from the app (and hopefully browser) anyway. The spreadsheet also should be downloadable for anyone to use. 

There is a little problem with the loading of map when GPS is on. It does not auto zoom in to location when there is no last known location. Will have to remember to correct that as well.

ChangeLog: https://www.dropbox.com/s/4pw1mf4zu2p36p5/Fruit3Sg_ChangeLog.rtf
APK: https://www.dropbox.com/s/tc11bydeokd9vu3/Fruit3SG-v0.4.apk



Please note all previous versions have been moved. From now onwards only the latest version will be available. If anyone requires an older version feel free to leave a comment and I will make it available.

v0.3

I chose 3 fruits to start with.
Created the icons for them.
Created a menu to change the fruits.
However the buttons do not toggle anything yet.



ChangeLog: https://www.dropbox.com/s/4pw1mf4zu2p36p5/Fruit3Sg_ChangeLog.rtf
APK: https://www.dropbox.com/s/en3eqazpror0m2f/Fruit3SGv0.3.apk

Please note all previous versions have been moved. From now onwards only the latest version will be available. If anyone requires an older version feel free to leave a comment and I will make it available.



StackOverflow, v0.2.2

After a few more hours of searching for the problem I decided to enlist some help on StackOverflow.
I posted my problem there and within minutes it was answered, with one of the replies being the solution.

Link to my question: http://stackoverflow.com/questions/23958873/textview-causing-app-to-crash

And the hero that saved the day:


Source Code: https://www.dropbox.com/s/y5512ugypm3okhe/FruitTreeSG-v0.2.2-sourcecode.zip
APK: https://www.dropbox.com/s/8x0bzz9i7axno90/Fruit3SGv0.2.2.apk
ChangeLog: https://www.dropbox.com/s/4pw1mf4zu2p36p5/Fruit3Sg_ChangeLog.rtf

Friday 30 May 2014

Error Hunting

Well I thought I would add in the Legal Notices.
However I kept getting errors I could not resolve. After very long I realized it was because I had given a layout and an id the same name.

After that my app kept crashing. back when I used to work with C++/C the way I looked for error was by putting 'cout's to trace where the program actually crashed.

I tried the same for this but I realized it was not so easy to print to screen. I am not sure how to access the log file as well.

However I started making portions of the code I suspected the error was at into comments to narrow it down. I spent quite a bit of time changing to comments, fixing, comments, fixing until I finally narrowed it down to a specific function called TextView. I'm going to bed now, will continue work on this tomorrow.


Oh yeah the System.out.println() did not work. Not sure how it is supposed to be used, will look it up tomorrow.