Shop OBEX P1 Docs P2 Docs Learn Events
Propeller add-on for Raspberry Pi: RoboPi.. the most advanced robot controller for Pi - Page 6 — Parallax Forums

Propeller add-on for Raspberry Pi: RoboPi.. the most advanced robot controller for Pi

13468912

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-13 14:47
    Update:

    I have released the initial version of:

    - RoboPi Spin API Object
    - RoboPi Firmware

    The API supports:


    24 digital I/O pins, each of which can be configured as

    - digital input
    - digital output
    - servo output
    - pwm output

    8 analog inputs

    - may also be treated as digital inputs 24-31

    You can find the files at the RoboPi web page:

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

    RoboPi v0.71-bst-archive-140313-142734.zip

    Spin archive of the RoboPi API Object and the RoboPi serial firmware, with required Obex files.

    RoboPi EEPROM Images.zip

    RoboPi firmware eeprom images, both 100Mhz and 80Mhz versions are in the zip archive.

    The firmware is configured for 115200bps, 8N1

    Next:

    1) I am cleaning up the RoboPi C API for communicating with the RoboPi firmware, the release of the firmware is imminent (one or two days)

    2) I am re-writing the diagnostic to use the RoboPi API, and will produce a "native" propeller Spin version, and a C version for the Raspberry Pi.

    3) After that, I will start releasing demos, application notes, and the user manual.

    4) I plan to add more functionality to the API to make RoboPi a very smart board indeed...

    5) The API and serial comms will be improved over time

    Bug reports, documentation errors, and suggestions should be posted to this thread.
  • kuronekokuroneko Posts: 3,623
    edited 2014-03-13 16:12
    RoboPi v0.71-bst-archive-140313-142734.zip
    All SPIN files in there have zero length. Forgot what triggered this with bst but you better repackage it.
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-13 16:30
    I packed it with BST under Ubuntu 12.03 64 bit with 32 bit compatibility libraries. Will re-pack manually and re-upload.

    Very weird, as when I opened the zip, it showed the correct file sizes - but they open as zero length.

    Thanks for the heads up!
    kuroneko wrote: »
    All SPIN files in there have zero length. Forgot what triggered this with bst but you better repackage it.
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-13 16:41
    Ok, I've manually made a zip, and uploaded it.

    Then I downloaded it, and checked that the Spin files were ok.
  • kuronekokuroneko Posts: 3,623
    edited 2014-03-13 17:35
    Checks out OK. One last thing, the primary object refers to RoboPiObj_v0_7 when it should be RoboPiObj_v0_71.
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-13 17:40
    Thanks - will be bumping revisions soon :)

    I forgot to remove the obsolete servoAttach() and servoDetach() methods, so I'll be uploading a new version RSN
    kuroneko wrote: »
    Checks out OK. One last thing, the primary object refers to RoboPiObj_v0_7 when it should be RoboPiObj_v0_71.
  • ratronicratronic Posts: 1,451
    edited 2014-03-13 17:52
    I just might have to check out your board Bill. I just received my model B board and am posting this post using the Pi.
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-13 20:26
    Sounds good :)

    I'm having a lot of fun with Pi+RoboPi ... I've built two bots based on that combination so far.

    The user manual is up to v0.30, with any luck, I'll be able to post a pre-release version on my site by monday.
    ratronic wrote: »
    I just might have to check out your board Bill. I just received my model B board and am posting this post using the Pi.
  • DiverBobDiverBob Posts: 1,097
    edited 2014-03-14 03:14
    Got my 6 RoboPi boards in the mail yesterday. Nice packaging, boards look nice also. I'll download the instructions and put one together this weekend if the wife doesn't pull me away for HoneyDo items. Looking forward to trying these out, networking them will be the next big challenge.
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-14 14:22
    Thanks DriverBob - I am glad you like the boards!

    Please don't hesitate to ask if you have any questions.

    Meanwhile, here is a photo of one of my RoboPi testbeds

    RoboPi-Elf-Side1-web.JPG

    (Click on thumbnail for larger image)

    I used it to verify driving gear motors with PWM via a small dual h-bridge board.
    800 x 600 - 158K
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-17 09:05
    I've uploaded the "RoboPi User Manual v0.40" to the RoboPi product page

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

    Your feedback is appreciated!

    p.s.

    The manual is NOT complete, I still have to add some more examples, etc., but it is enough to get started with.

    I plan on uploading RoboPiLib.zip later today.
  • David BetzDavid Betz Posts: 14,511
    edited 2014-03-23 08:13
    What is the recommended way of powering the RoboPi if you want to use it in standalone mode with a PropPlug?
  • David BetzDavid Betz Posts: 14,511
    edited 2014-03-23 08:24
    Here is another suggestion for the next revision of your manual. Under the "Testing" section you suggest checking for shorts between various pins on the Pi header but I don't see any definition of the pins on that header. I guess I can go to the RaspPi forum but it would be nice if it was in your manual to allow testing without doing a web search.
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-23 10:30
    David Betz wrote: »
    What is the recommended way of powering the RoboPi if you want to use it in standalone mode with a PropPlug?

    I use one of those "USB Power Banks" that provide a regulated 5V output. Just grab a USB cable, and cut it in half.

    Strip the four leads on the half with the "A" (male, flat) connector.

    Identify GND and 5V (probably red and black, but a voltmeter can tell you, or you can check for continuity with the USB A connectors 5V and GND pads)

    1) If you are not planning on mounting RoboPi on a Pi in the future

    a) You can solder +5 and GND to the +5 (either of pin 2 / pin 4) and GND (pin 6) of the Pi connector

    b) You can add another screw terminal by soldering it into pin 2 & pin 6 (+5 and GND respectively)

    2) If you might want to mount it on a Pi later

    - solder in the Pi stacking connector

    a) use a 3 pin male header, pull out the middle pin, insert the header, solder the +5V to the short end of the inserted header at Pi pin 2, and the GND at Pi pin 6

    b) solder the 5V wire close to the connector on stacking pin 2, and GND close to the connector on stacking pin 6

    Very good question, I will add the above instructions to the assembly manual.
    David Betz wrote: »
    Here is another suggestion for the next revision of your manual. Under the "Testing" section you suggest checking for shorts between various pins on the Pi header but I don't see any definition of the pins on that header. I guess I can go to the RaspPi forum but it would be nice if it was in your manual to allow testing without doing a web search.

    Excellent suggestion, it will be in the next rev of the manual. Don't know why I did not think of that!

    Please keep letting me know how your RoboPi journey goes!

    I am planning to release RoboPiLib for the Pi side later today, along with a new user manual revision that documents it.
  • David BetzDavid Betz Posts: 14,511
    edited 2014-03-23 11:51
    I use one of those "USB Power Banks" that provide a regulated 5V output. Just grab a USB cable, and cut it in half.

    Strip the four leads on the half with the "A" (male, flat) connector.

    Identify GND and 5V (probably red and black, but a voltmeter can tell you, or you can check for continuity with the USB A connectors 5V and GND pads)

    1) If you are not planning on mounting RoboPi on a Pi in the future

    a) You can solder +5 and GND to the +5 (either of pin 2 / pin 4) and GND (pin 6) of the Pi connector

    b) You can add another screw terminal by soldering it into pin 2 & pin 6 (+5 and GND respectively)

    2) If you might want to mount it on a Pi later

    - solder in the Pi stacking connector

    a) use a 3 pin male header, pull out the middle pin, insert the header, solder the +5V to the short end of the inserted header at Pi pin 2, and the GND at Pi pin 6

    b) solder the 5V wire close to the connector on stacking pin 2, and GND close to the connector on stacking pin 6

    Very good question, I will add the above instructions to the assembly manual.



    Excellent suggestion, it will be in the next rev of the manual. Don't know why I did not think of that!

    Please keep letting me know how your RoboPi journey goes!

    I am planning to release RoboPiLib for the Pi side later today, along with a new user manual revision that documents it.
    Sounds like too much work to me!
    Maybe I'll just plug it into the Pi and hope for the best. :-)
  • David BetzDavid Betz Posts: 14,511
    edited 2014-03-23 12:08
    I have another problem. R17 is too close to the nylon standoff mounting hole so the nylon nut will not fit.
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-23 12:36
    I found the nylon screw will fit, so just reverse the direction the standoffs point in.

    RoboPi is meant to be the top board in the stack, however "Pi Jumper" stacks on it just fine

    http://www.mikronauts.com/raspberry-pi/pi-jumper/
    David Betz wrote: »
    I have another problem. R17 is too close to the nylon standoff mounting hole so the nylon nut will not fit.
  • David BetzDavid Betz Posts: 14,511
    edited 2014-03-23 12:38
    I found the nylon screw will fit, so just reverse the direction the standoffs point in.

    RoboPi is meant to be the top board in the stack, however "Pi Jumper" stacks on it just fine

    http://www.mikronauts.com/raspberry-pi/pi-jumper/
    I tried inverting it and that didn't work either. Also, I really wanted the nuts on the top so they don't stick out so far underneath the Pi board since that is on the bottom of my stack.
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-23 12:40
    Before mounting it on a Pi, just check for shorts as per the manual.

    Also check for short between TX & RX (pins 3&4 on the PropPlug connector), and make sure pin 2 on PropPlug is not shorted to ground (/RST)

    If there are no shorts, mount it without the chips in RoboPi. If the Pi boots normally, you are good to go - shut down the pi, populate RoboPi.

    You could also just run +5 and GND from the Pi to RoboPi with a short cable instead of mounting RoboPi yet, and use a PropPlug for initial tests.

    Also any regulated "wall wart" 5V DC power supply can run RoboPi.

    I know my description sounded like a lot of work... actually it takes little time, I was just being thorough with my description.
    David Betz wrote: »
    Sounds like too much work to me!
    Maybe I'll just plug it into the Pi and hope for the best. :-)
  • David BetzDavid Betz Posts: 14,511
    edited 2014-03-23 13:29
    I didn't find any shorts so I plugged it into the Pi and powered up the stack. I didn't see any blue smoke and the green LED on the RoboPi came on and the Pi booted. I'm logged in now. I guess I should try installing your software to test the RoboPi to see if its working.
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-23 13:33
    Good progress!

    I am in the process of cleaning up RoboPiLib.c, but I can email RoboPiLib.o and RoboPiLib.h to you before its on the web site. You can also grab the eeprom image from the web page, or follow the previous PropGCC on Pi thread, with the propeller_load3 version that can program the Prop from the Pi.

    I have to run an errand in about half an hour, but should be back soon after that.

    If you can't find the working propeller_load, I'll grab the binary off my one of my Pi's and email it to you.
    David Betz wrote: »
    I didn't find any shorts so I plugged it into the Pi and powered up the stack. I didn't see any blue smoke and the green LED on the RoboPi came on and the Pi booted. I'm logged in now. I guess I should try installing your software to test the RoboPi to see if its working.
  • David BetzDavid Betz Posts: 14,511
    edited 2014-03-23 13:36
    Good progress!

    I am in the process of cleaning up RoboPiLib.c, but I can email RoboPiLib.o and RoboPiLib.h to you before its on the web site. You can also grab the eeprom image from the web page, or follow the previous PropGCC on Pi thread, with the propeller_load3 version that can program the Prop from the Pi.

    I have to run an errand in about half an hour, but should be back soon after that.

    If you can't find the working propeller_load, I'll grab the binary off my one of my Pi's and email it to you.
    What is propeller-load3?
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-23 13:39
    I may be mis-remembering the file name, it was a version patched about a year ago by Heater that works, resets prop via GPIO #17

    As the Pi serial port does not bring out RTS or DTR to the main header, a gpio must be pulsed low to reset the prop, and #17 is what people tend to use.
    David Betz wrote: »
    What is propeller-load3?
  • Heater.Heater. Posts: 21,230
    edited 2014-03-23 13:45
    That loader is very old now.

    I started on a new one a little while ago. Sources are here: https://github.com/ZiCog/pi-propeller-load
    I got the GPIO reset code in there but never did get around to testing it. Me and my Pi's don't meet up very often. I should get more.

    Now I'm not sure that those github sources are taken from the correct branch of propgcc and they might be getting out of date by now as well.

    What would be the best base loader code to start from now?
  • David BetzDavid Betz Posts: 14,511
    edited 2014-03-23 13:47
    Heater. wrote: »
    That loader is very old now.

    I started on a new one a little while ago. Sources are here: https://github.com/ZiCog/pi-propeller-load


    Now I'm not sure that those github sources are taken from the correct branch of propgcc and they might be getting out of date by now as well.

    What would be the best base loader code to start from now?
    What would be best would be to merge your changes into the default branch under a RASPBERRY_PI ifdef or something like that.
  • Heater.Heater. Posts: 21,230
    edited 2014-03-23 13:48
    Sounds like a plan David, I'll have another look at that soon. Won't be this week though I'm off to Amsterdam for a trade expo.
  • David BetzDavid Betz Posts: 14,511
    edited 2014-03-23 13:54
    Heater. wrote: »
    Sounds like a plan David, I'll have another look at that soon. Won't be this week though I'm off to Amsterdam for a trade expo.
    Looks to me as though I could just adopt your version of osint_linux.c along with a few friends and it might work. Did you change anything other than the GPIO reset?
  • Heater.Heater. Posts: 21,230
    edited 2014-03-23 14:04
    Looks like propeller_load.c got changed a bit.

    I was wondering if you would like my mods or not. I seem to remember I changed the RTS/DTR selection from a boolean to an emum that included GPIO. That change percolates up from osint.

    In my original version a year ago, somehow I lost the code, I did some regexp comparisons on the serial port device such that /dev/ttyAMA0 would get the GPIO reset. The idea being that even on the Pi you might want to program via normal USB serial ports as well so a special ifdef build is not satisfactory.
  • David BetzDavid Betz Posts: 14,511
    edited 2014-03-23 14:17
    Heater. wrote: »
    Looks like propeller_load.c got changed a bit.

    I was wondering if you would like my mods or not. I seem to remember I changed the RTS/DTR selection from a boolean to an emum that included GPIO. That change percolates up from osint.

    In my original version a year ago, somehow I lost the code, I did some regexp comparisons on the serial port device such that /dev/ttyAMA0 would get the GPIO reset. The idea being that even on the Pi you might want to program via normal USB serial ports as well so a special ifdef build is not satisfactory.
    I saw what you did in propeller-load and it looks fine to me other than a minor typo:

    You have this:
            if (use_reset_method ("value"))
            {
                printf("error: no reset type '%s'\n", value);
                return 1;
            }
    

    But I think you meant this:
            if (use_reset_method (value))
            {
                printf("error: no reset type '%s'\n", value);
                return 1;
            }
    
  • Heater.Heater. Posts: 21,230
    edited 2014-03-23 14:23
    Ugh, well spotted. Shows it never got tested.
Sign In or Register to comment.