Shop OBEX P1 Docs P2 Docs Learn Events
propeller to raspberry? — Parallax Forums

propeller to raspberry?

Today I attended a group meeting that was full of arduino and raspberry pi enthusiasts. They started talking about this and that, something about php scrips, bottomline it was all greek to me (and I am greek :-P ).
Nevertheless someone presented an autonomus vehicle that had 3 arduino and one raspberry pi. Didnt understand much, just in this field for hobby, yet the possibilities for something like this are endless!
Can a raspberry pi be the "server" and have slave propeller for the peripherials like motors, sensor etc?
Has anyone got a simple code and wiring? Where can someone start learning about these?
Dont suggest boards and shield, I just fried a propeller chip and had to buy a new one.

Keep in mind when explaining that I am a finance guy so remember that hearing what is the difference between some financial instruments and getting confused is exactly the same what happens when people get too technical.
Thank you!

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2015-11-08 22:11
    Have you looked at the Propeller Hat? This is exactly what it's for.

    This is not a simple task. If PHP scripts and similar tech-speak are foreign to you, perhaps you need to start at the beginning. There are links from the above product page to simple tutorials for the Propeller side of things. On the Raspberry Pi side, you need to first learn how to control the I/O pins from one language or another that it supports and you need to learn how to send and receive serial I/O using the Pi. The Propeller tutorials show you how to interact with external signals (like the I/O pins of the Pi) and how to send and receive serial data (like from a PC or the Pi). Once you get to that point, you can plan your project. What you end up sending back and forth between the Propeller and the Pi will depend on what you want to do. There's not much in the sense of off-the-shelf code for this. There's plenty of existing code in the Propeller Object Exchange for interacting with sensors or controlling motors and code for taking serial data and interpreting parts of it as numbers or extracting bits of text (like command words), but you need to supply the glue to organize everything and orchestrate the interaction with the program on the Pi.

    You might start by using the Raspberry Pi as a terminal for the Propeller and for editing and compiling for the Propeller. You can install PropellerIDE under Raspbian for this. Work through some of the tutorials for the Prop from Parallax's learn website this way. Get a book on learning to program the Raspberry Pi and work through their tutorials. When you get comfortable with that and with handling sensors and motors from the Propeller, we can talk about the two interacting in a more complex manner. There was a Propeller Servo Controller that's no longer manufactured, but the documentation is available and it's a good example of how to use a Propeller as a motor controller for some other microcontroller.
  • Can a raspberry pi be the "server" and have slave propeller for the peripherials [sic] like motors, sensor etc?

    Seems to me that's an ideal situation, especially as both use 3.3v IO. I have pieces to play with -- I just haven't yet. My intent is to turn the Propeller into a slave device for specialty IO that connects to the RPi through a serial link.
  • Heater.Heater. Posts: 21,230
    johnproko,
    Can a raspberry pi be the "server" and have slave propeller for the peripherials like motors, sensor etc?
    Yes indeed!

    If you are just starting out with Raspi and Propeller and programming there is a lot to learn. Don't be put off it's all good fun if you tackle it one small step at a time. Forget about web servers/PHP and all that initially. The first step is getting a simple program on the Pi to talk to a simple program on the Propeller.

    On the Propeller you will need a serial communications object, say Full Duplex Serial. Create a simple Spin program that sends messages (like "hello") to the Pi. And receives whatever comes back.

    On the Pi you will need a simple program that does the same. If you are new to programming perhaps Python is the best language to get started with there.

    As for connecting the two together you only need to connect a Tx, Rx and ground pin from Pi to the Prop. The Pi has a serial UART's tx and rx pins on the GPIO header. In the Pi program the UART is accessed as the device /dev/ttyAMA0. You need to ensure that device is not used by the OS when you run your program, I believe that can be set in raspi-config now a days.

    I like to put 200 ohm resistors in series with the Tx and Rx lines to protect them in case of any programming mishaps.







  • Here is an interesting minimal install of Linux offered for the Raspberry Pi. May speed things up a bit.


    http://arm.slitaz.org/rpi/

  • I have been working on a Raspberry PI controlled robot, using the Stingray and Eddie platforms. In both cases, the propeller control boards are programmed in a TACHYON (forth) based robot control language. The Pi communicates to the propeller through a serial port. The Pi is programmed to send motion commands to the propeller . My plan is to have the Pi send appropriate motion commands, depending on sensor data received from the propeller.

    You have several programming options on the Pi, e.g.,Python, basic (RTB) or Gforth. However, I chose to use Mathematica which has many advantages for this type of application: pattern recognition, image processing, text-to-speech engine, etc. You can communicate with the Pi, using VNC for wireless control.

    Nick
  • Heater.Heater. Posts: 21,230
    @Loopy,

    Why complicate things by suggesting a non-standard operating system installation?

    @nglordi

    Why complicate things with Mathematica for a beginner ?
  • Slitzaz is supposed to operate entirely in RAM, so you have more space to store programs and likely more speed.
  • You might like my RoboPi controller :-)

    http://www.mikronauts.com/raspberry-pi/robopi/

    Adds a prop + 8 channel 12 bit ADC to any Pi (or many other sbc's, 11 at last count)
    johnproko wrote: »
    Today I attended a group meeting that was full of arduino and raspberry pi enthusiasts. They started talking about this and that, something about php scrips, bottomline it was all greek to me (and I am greek :-P ).
    Nevertheless someone presented an autonomus vehicle that had 3 arduino and one raspberry pi. Didnt understand much, just in this field for hobby, yet the possibilities for something like this are endless!
    Can a raspberry pi be the "server" and have slave propeller for the peripherials like motors, sensor etc?
    Has anyone got a simple code and wiring? Where can someone start learning about these?
    Dont suggest boards and shield, I just fried a propeller chip and had to buy a new one.

    Keep in mind when explaining that I am a finance guy so remember that hearing what is the difference between some financial instruments and getting confused is exactly the same what happens when people get too technical.
    Thank you!

Sign In or Register to comment.