Receiving Input From a Raspberry Pi 2 (3.3v)
mjcrepeau
Posts: 4
in BASIC Stamp
Hey guys! I'm new here, and new to working with electronics in general, so I apologize in advance if anything I ask sounds ignorant.
I'm trying to work out a basic method of controlling a Boe-Bot with my Pi. I am planning on using the GPIO pins to send voltage to the input pins on the BASIC stamp, but I don't know how to do this without damaging the stamp.
I know that the Pi puts out 3.3v from the pins when they're set to high, and 0v when set to low. My plan was to use 4 different pins and depending on which of them are set to high (which will be detected by the input pins on the stamp) the Boe-Bot will move forward, back, left, or right. My question is, how do I wire this, and do I need to worry about voltage or current (do I need a resistor)? Is it as simple as going straight from the GPIO pin on the Pi to the input pin on the Boe-Bot's board? Do I need to ground anything?
I feel like this is a simple idea, but I don't know how to do it correctly, and I don't want to damage anything.
Once again, sorry if I'm lacking a huge piece of the puzzle here. Let me know if you need more information. Thanks in advance for the help!
I'm trying to work out a basic method of controlling a Boe-Bot with my Pi. I am planning on using the GPIO pins to send voltage to the input pins on the BASIC stamp, but I don't know how to do this without damaging the stamp.
I know that the Pi puts out 3.3v from the pins when they're set to high, and 0v when set to low. My plan was to use 4 different pins and depending on which of them are set to high (which will be detected by the input pins on the stamp) the Boe-Bot will move forward, back, left, or right. My question is, how do I wire this, and do I need to worry about voltage or current (do I need a resistor)? Is it as simple as going straight from the GPIO pin on the Pi to the input pin on the Boe-Bot's board? Do I need to ground anything?
I feel like this is a simple idea, but I don't know how to do it correctly, and I don't want to damage anything.
Once again, sorry if I'm lacking a huge piece of the puzzle here. Let me know if you need more information. Thanks in advance for the help!
Comments
On the other hand, you'll probably want a voltage divider or something if you want to send signals back from the BS2 to the Pi.
The BOE and the Pi should have their grounds tied together.
You could use your 4 pins more efficiently. Two could be left wheel forward, back, or stop, and the other two could be right wheen forward, back, or stop - this would allow you to do forward, stationary, and reverse left and right turns, as well as basic forward, back, and stop. Or, you could only have the 4 motions you mentioned and only use 3 pins - an enable, a left wheel direction, and a right wheel direction.
Just to get things straight in my head:
I can run a wire from a GPIO pin on the pi to one of the inputs on the BOE (P0 for example). And then all I need to do is just run a wire from one of the Pi's ground pins to the ground (Vdd) on the BOE?
Also, thanks for the idea on how to better used the 4 pins Electrodude! I will probably implement that once I have this up and running!