My first experience in Hackanthon - iTech2015

I came across a group post in Facebook which says there;s a IoT hackanthon happening in Banglore. Ah, I am going to move to IoT team next month and this would be a good chance to get exposed myself to the technology. And the best part about the hackanthon - There's a takeaway kit. Sounds good. There's a catch. You have to submit you idea and they will shortlist the team. So Mervin and I assembled in Karthick Singaram's place to brainstorm the idea. I pitched my traffic signal controller idea which controls the traffic when a ambulance comes close by it. It doesn't impress them well. But the team leader Singaram had a brighter idea. A bar code scanner fixed into the trolley and the user have to scan the product's barcode every time they puts into the trolley and at the checkout they have to tell the trolley number after which the bill will be automatically generated. Despite the disadvantages in the idea, out team got selected!
Unfortunately, my sister and family was coming back to chennai that week and Saturday morning refreshment was a doubt. With the doubt we went to Banglore and got down in the Banglore East station. We walked for about a mile to the ITC infotech park and as expected we were unwelocmed at 5.00 clock in the morning. So the Singaram (team/gang leader hereafter) called the organizer and tada. He told there's a guest house nearby and we have got a room in it. The guest house was another half a mile away from the tech park and we walked in. The room keeper came down to pick us up and when we opened a house we were in for a surprise. It was a bloody DUPLEX house. They gave a single room for all both of us initially thinking that only two guys are coming in but eventually in the next fifth minute they gave another room in the top floor. It was really a state of art guest house.
Some Pictures of the guest house:
The Bed room

The Bed room View 2

Dining space on the top floor

View of the hall from the top

Awesome Hall

Love this big table in the hall

They had a rack full of ITC products. You can even use them ;)

These designer pots were really cool.

The Balcony

After having breakfast at the guesthouse we went to the ITC infotech park for the event. The checkin was done and at the event area we had all these young minds (and old too. only in their age) ready for the hackathon. The MD and CEO of the company kickstarted the event in a very stylish way.

After the event kit start, we collected out kit which included a Raspberry Pi Model B, breadboard, jumper wires and a USB cable, Hey. I forgot to mention. Each one of us got a 90 days Microsoft Azure subscription and an 8GB pendrive.

The event area

Mervin (L) and Sai working with the ThingWorx platform

So after getting into the workspace we had everything to get started. The catch is that we have to use Raspberry pi (R-Pi hereafter) to send sensor data to the ThingWorx which should be used to process the data and display it to the user as a webpage. We had a barcode scanner and it was really easy to interface. You have to plug the barcode scanner to the usb port and if you can scan it it types the barcode numbers, just like a keyboard. It sounded easy initially but  when we tried initially with the R-Pi it didn't read like a laptop read. I suppose it was reading ORD characters. Fortunately, this thread helped to resolve the problem. The mentor team from the ThingWorx gave us a cURL command to send the data from the R-Pi to the ThingWorx server. The cURL command looked like this:
curl -k -H 'appKey:ea11ab44-04cb-4093-95cb-0c2df398cd0f' -H 'Content-Type:application/json' --data '{"Current_Temp":55,"Current_Hum":40}' https://i3liot2.cloudapp.net:8443/Thingworx/Things/Am2302Thing/Services/setPropValues
Thanks to the OS library in python to send this command to the terminal. We were using the server 3 at that time. So one part was successfully done in the first day itself. Here comes the hardest part.
Sai started exploring the weather application example given as example. We were sending the barcode data in the variable Current_Temp. Initially, Sai created a page which displayed the data  in a webpage. But we wanted to display the data in a list with a checkout button. There was a mentor whom we suppose had a very good experience with the platform and she was helping us out. The problem is all other team were having a hard time exploring the platform and she had to help others also. Around 2 AM we took a break to brainstorm. There was space with beanbags and it was really good. We decided to add a proximity sensor to the barcode so that the user don't have to press the button every time; they just had to bring the product nearby the scanner and the scanner will automatically reads the data. Hands free. We were able to hack it by borrowing a soldering station. Since I and Mervin weren't able to understand the ThingWorx platform we both went back to the guest house to sleep. By 6 AM Sai and team lead came back to the guest house. By 9 o'clock we went to the event space. Sai and team lead were able to list the data previous night in the ThingWorx site. But next day they informed that the server 3 crashed and they couldn't bring it up. Sai and team lead did a great job for the next 3 hours and they were able to recreate the same app as before. We demonstrated the application to the juries and one of the non-juries asked a question at the end of the judging which might have affected our score. After that ITC hotel buffet followed and we had a great lunch.

The hacked Barcode scanner

The web interface

The sketchup model of the smart trolley
All in all it was a great first time hackanthon, with free food,great networking experience. Although we didn't win the hackanthon we walked out of the space with satisfaction. This event gave me motivation to participate in more events like these.