Pi-Boe - Raspberry pi
Parallax Boe-bot (Basic Stamp; Board of Education USB)
Wireless adapter Wireless IP camera
(an android phone with a busted screen running an IP webcam app on start up)
Greetings LMR! This is my first post here and I am a new member. So, Saturday afternoon I was stuck indoors because I was sick. I started looking around at the electronics in my room, and this was born. The chassis is from a parallax Boe-bot of course(Be-bo as I like to refer to it). Basically what I've done is made the Rpi into a webserver. Thanks largely to drcurzon's tutorial on Instructables.(I had no experience with web programming, and this was a great opportunity to learn!). It is currently controlled by a web page and the debug terminal, to take advantage of the USB ports.(I've attached a picture of the page). This is rather messy and haphazardly thrown together and I will be improving it. This bot came together in two iterations.
1) I polled the debug terminal for incoming commands and executed movements accordingly. The commands were sent by logging in to the Rpi via my wireless local network, and executing a python script via the terminal. I established a Serial Connection via the Pyserial module. I wanted continuous input for control.
2)I used apache, MySQL, and a bash script as in the instructable I mentioned above. Basically, I can turn the Rpi's GPIO pins via a bash script, and a control.php webpage. The basic stamp then reads the state of the pin and executes movements accordingly. 3.3v is enough to pass the threshold to register as HIGH on the basic stamp(BS2 by the way). The bash script has to be running for the web control to work, so sometime soon I will be writing an init script and adding it to the boot sequence.
The second iteration is kind of dirty, but accomplishes my goal of a web controlled bot with an IP webcam(kind of a little security bot). I want to utilize the Rpi's UART pins with the basic stamp, but due to my lack of web programming knowledge I am unsure of how execute serial commands via a web interface. This is mainly a software project I suppose. A large portion of this is to teach myself about webservers and connecting that to physical output. Also I am an advocate of using old things in new ways, i.e. the boe-bot chassis. Be-bo was my first bot so I am paying homage to him with this project. Input is welcomed, thank you in advance, and thank LMR for facilitating this site!!
I swapped out the Basic Stamp for an Arduino Mega. I have a power transistor connected to the GPIO pin of the Rpi that I can turn the Mcu and sensors on and off through software to save power. Also I have a power transistor from the arduino to the servos, So that I can cut the power to the servos and save precious Amps. I want to add a circuit in to measure power capacity so that it can manage it's own power. Also since this is kind of a security bot, I can move it into position and cut power so that it can last longer.
Lately I've been trying to use fopen(); in PHP to communicate with the serial port. I've tried to open it like a file and write to it in a similar manner. I've programmed the arduino to operate on serial commands. Alas, when I run the php script, no response. I will be re-examining everything I've done, and give it another go. Any advice is welcome!