News for hackers. Stuff that matters.
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by zenocon on Tuesday July 03, 2012 @01:36PM (#4195179)
That's cool. Incidentally, I'm building something related (incorporates node, Twilio, and Roving Networks WiFly). We launched a Kickstarter that did not make funding http://www.kickstarter.com/projects/daisyworks/internet-your... but I am continuing to build it out. It monitors sensors and alerts you when conditions are met. You can also control the RN WiFly to drive GPIO through the web browser using node, redis and SocketStream on the backend. The hardware we built also allows you to plug in an Atmel/Arduino with more sensors - so you could do things like drive a servo from your browser/phone, or control a robot.
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by jonmarkgo on Tuesday July 03, 2012 @01:37PM (#4195184)
That sounds awesome, reminds me of Twine a bit. I'd love to talk more about it if you want to drop me an e-mail: [email protected]
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by zenocon on Tuesday July 03, 2012 @02:20PM (#4195413)
Cool - sent you an email. Would be great to collaborate / exchange ideas.
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by thechut on Tuesday July 03, 2012 @02:03PM (#4195300)
Great work! I don't have any experience with node.js but this looks very cool, and I love that you can just call it up.

From your writeup:

>This code is mostly self-documenting, however the one area that confused me starting out was that you need to open a Serial port in order to use the WiFly module.

>The one possible issue to note is that you cannot use the Serial monitor or the Serial.print commands because the WiFly has taken over the usual port.

If this was causing debug headaches for you I would reccomend checking out the NewSoftSerial library by Arduiniana[1]. It allows you to turn any digital pins on the Arduino into a UART serial (RX/TX) setup. I use it all the time with Bluetooth or Xbee projects. If you are using Arduino IDE 1.0 it's actually already included, you don't even have to donwload the library, it's called just "SoftSerial" in the library menu I believe.

[1]: http://arduiniana.org/libraries/newsoftserial/

Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by jonmarkgo on Tuesday July 03, 2012 @02:12PM (#4195361)
Can you use NewSoftSerial for Serial Monitor output? The problem was that the Wireless SD shield connects the RN-XV directly into pins 0/1 (hardware serial) so I was unable to use the Serial Monitor.
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by thechut on Tuesday July 03, 2012 @02:27PM (#4195454)
I don't have any experience using the wireless SD shield, but after looking at it, I see what you are saying. It forces the connection on 0 and 1 and then has a switch to use when you need to program it? That seems like a silly limitation of the wireless SD shield. I use the Adafruit breakout boards for my Xbee's or wireless modules. You should still be able to use software serial to setup a debugging serial environment, so you can use Serial.print() etc. Here are some references:

SoftwareSerial- http://arduino.cc/hu/Reference/SoftwareSerial

Wifly Tester- http://arduinology.tumblr.com/WiFly

Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by jonmarkgo on Tuesday July 03, 2012 @02:42PM (#4195526)
I'll have to try that - I was able to use the Wireless SD shield to have a direct connection to the WiFly, but once I switched it back I was unable to use the Serial Monitor - looks like SoftwareSerial might solve that
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by jonmarkgo on Tuesday July 03, 2012 @01:31PM (#4195144)
If anyone has any other Twilio/Arduino tutorials they would like to see, please let me know! I'm working on another one at the moment but am always open to suggestions
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by hack_edu on Tuesday July 03, 2012 @01:33PM (#4195162)
Why in God's name is Node.js at all appropriate for this?!
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by jonmarkgo on Tuesday July 03, 2012 @01:36PM (#4195181)
It was the easiest way I found to set up a simultaneous HTTP server and TCP socket to the bot. What would you recommend?
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by kylek on Tuesday July 03, 2012 @02:05PM (#4195314)
who cares. i only hope to see something interesting with hubot[1] come out of it!

[1] https://github.com/github/hubot

Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by jonmarkgo on Tuesday July 03, 2012 @02:41PM (#4195524)
Awesome idea, Arduino adapter
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by jgrahamc on Tuesday July 03, 2012 @12:43PM (#4194888)
Would be interested to know how much power those servos are pulling from the Arduino. The regulator on the Uno is fairly limited in power output and there's also the WiFi board to power as well.

Did you experience any problems with crashes on the Uno because of a lower power condition?

Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by jonmarkgo on Tuesday July 03, 2012 @12:45PM (#4194895)
I didn't experience any crashes, but I also haven't tried running the bot for any extended period of time (longest I had it on was maybe 10 minutes)

If I were to make this a consumer device, or even make it a bit more resilient I'd definitely use a separate power supply but for the purposes of just making it work, 1 9V did the trick.

Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by Bharath1234 on Tuesday July 03, 2012 @01:06PM (#4195014)
Great one ! Thanks a lot !! Could you tell me how to connect some Input device like UI Screen with Arduino and get touch inout from it? Any links will be helpful!!
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by jonmarkgo on Tuesday July 03, 2012 @01:14PM (#4195053)
This tutorial looks pretty solid, LadyAda is pretty great: http://www.ladyada.net/products/tfttouchshield/
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by Bharath1234 on Tuesday July 03, 2012 @01:24PM (#4195107)
This is the one I was looking for ! Thanks !
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by arrowgunz on Tuesday July 03, 2012 @02:05PM (#4195316)
I love the idea and the project. It's so awesome. I am so happy to see NodeJS being used this way. +10 man.
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by jonmarkgo on Tuesday July 03, 2012 @02:18PM (#4195396)
Glad you enjoyed it!
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by ericmoritz on Tuesday July 03, 2012 @12:37PM (#4194854)
this is basically the Rube Goldberg machine of robotics; which is cool in its own right.
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by jonmarkgo on Tuesday July 03, 2012 @12:38PM (#4194866)
Hah, I suppose so. The hardest part for me was getting the WiFi module to work - it was very finicky...
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by eragnew on Tuesday July 03, 2012 @12:25PM (#4194777)
holy crap, i need to build one of these. just to see how it works.
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by jonmarkgo on Tuesday July 03, 2012 @12:32PM (#4194821)
Its pretty fun to play with, honestly. Hasn't tried to kill me yet...
Re:Build a Robot Overlord Using Node.js, Twilio, and Arduino by eragnew on Tuesday July 03, 2012 @12:34PM (#4194833)
thanks for putting the tutorial together. looks like i have plans this weekend now :)