
Arduino IRC Bot using python
1 year ago
Sorry for the blurriness! Be patient.
This is a demonstration of a script I wrote using python which acts as a bridge between an IRC channel and your serial port (in this case, the arduino). In this scenario, I have the arduino set up with an led and a potentiometer. The bot software has signed on using the nick 'arduino' and I am getting my friend 'redguts' to send it messages all the way from Houston. The bot listens to the entire room's conversation but it doesn't respond until you address it by it's name, in this case, 'arduino: xxmssgxx'. It then reads the command and responds accordingly. You could also set it up to speak at will. For instance, if you programmed your arduino to detect when a certain event happens, say the temp in the room goes above a certain value, it can tell the IRC Channel without being queried. Or even set up private chats. I am not releasing the source this week but you can send me a private message if you are desperate and have python/arduino skills.
** Finally, get the code here blog.datasingularity.com/?p=148 **
This is a demonstration of a script I wrote using python which acts as a bridge between an IRC channel and your serial port (in this case, the arduino). In this scenario, I have the arduino set up with an led and a potentiometer. The bot software has signed on using the nick 'arduino' and I am getting my friend 'redguts' to send it messages all the way from Houston. The bot listens to the entire room's conversation but it doesn't respond until you address it by it's name, in this case, 'arduino: xxmssgxx'. It then reads the command and responds accordingly. You could also set it up to speak at will. For instance, if you programmed your arduino to detect when a certain event happens, say the temp in the room goes above a certain value, it can tell the IRC Channel without being queried. Or even set up private chats. I am not releasing the source this week but you can send me a private message if you are desperate and have python/arduino skills.
** Finally, get the code here blog.datasingularity.com/?p=148 **
-
Jenna Fox 1 year agoAwesome! Can you send a really long command and buffer overflow the arduino and reset the fuses and brick the thing too? that's be something to think about maybe. You could do command sanity checking in the python script to ensure things aren't crazy. :) -
beckel 1 year agoDepends on how you code it, but, probably not. This demonstration converts the string command (like 'lightLed') into a one byte long command according to a dictionary. -
Jenna Fox 1 year agoAh! I see. I was imagining the python library was only acting as a proxy, and the raw text of the commands was running down the serial interface. Makes sense now. ^_^ -
beckel 1 year agoWell, it could be written that way too. This is just a proof of concept. In other words, the code I wrote is 'some assembly required'. -
Zach Rogers 7 months agoVery cool!
This conversation is missing your voice. Take five seconds to join Vimeo or log in.
-
Vimeo: About / Blog / Developers / Jobs / Community Guidelines / Community Forums / Help Center / Site Map / Merchandise
/ Get Vimeo

Previous Week