Shop OBEX P1 Docs P2 Docs Learn Events
Propeller HAT for RPi — Parallax Forums

Propeller HAT for RPi

RsadeikaRsadeika Posts: 3,837
edited 2015-06-07 09:13 in Propeller 1
I don't suppose anybody has got their hands on one of those yet, that could report back? Looks like an interesting board, the Propeller and works are on the bottom side, while the breadboard, if needed, is on the top side, plus the headers give you access to most of the pins available.

My only concern is with the software, and how that would be implemented to access the Propeller. The Pimironi site refers to the Propeller IDE, but I am not so sure that that is ready for prime time yet, meaning, is it a straight install to the Raspberry Pi, or do you have to do some prep work prior to install? Interesting product, but a lot of things have to be sorted out first with the software end.

I have a project that is running a sht11 module with an RPi board using freeBasic as the software for accessing the sht11 module. I am thinking with the Propeller HAT I could eliminate the separate breadboard set up that I have now, and have everything more consolidated to one area, plus I could have the sht11 run by the Propeller, as a separate task, and have some more stuff added to the project, just thinking...

Ray
«1

Comments

  • mindrobotsmindrobots Posts: 6,506
    edited 2015-05-07 09:32
    I have a Propeller Hat sitting on my bench waiting to be played with. Mine came from Pimoroni before Parallax started offering them. It does look like a nicely built and supported add-on to the RasPi. I'm looking forward to see how it compares with Bill Henning's Robo-Pi which I also have and use.

    I'm not sure what the issues you are having with PropellerIDE on the RasPi are. I have it installed and working on a few different Raspi. True, it is not as easy as 'sudo apt-get propeller-ide' or a point-and-click selection from the package manager but if you follow the steps that have been laid out in a couple different posts on the forum, it is an easy (albeit, multi-step) install. Since Brett is pretty much a one-man show as far as PropellerIDE is concerned, I think his resources are better spent enhancing the product and fixing bugs rather than packaging up various distribution packages. As long as the provided installation instruction work and aren't too complicated (they aren't), PropellerIDE is certainly ready for prime-time.

    Unless your RasPi is overtaxed with handling the SHT-11 and/or you have some major expansion plans that incorporate the benefits of a Propeller/Pi combination, adding one just to pick up a breadboard hat and introduce the complexity of an additional co-processor doesn't seem like a good fit. I would think the Pi could keep up with a temp.humidity check every minute or so without any problems.
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2015-05-07 09:34
    Hi Ray,

    Fortunately, there is an active GitHub repository of documentation maintained by the Propeller HAT creator and early adopters. For example, here are the instructions for setting up PropellerIDE, updated just four days ago:

    https://github.com/pimoroni/propeller-hat/blob/master/documentation/Propeller-IDE-Getting-Started.md


    You can also ask questions on the Pimoroni forums to get support straight from the source.

    http://forums.pimoroni.com/
  • RsadeikaRsadeika Posts: 3,837
    edited 2015-05-07 11:59
    Unless your RasPi is overtaxed with handling the SHT-11 and/or you have some major expansion plans that incorporate the benefits of a Propeller/Pi combination, adding one just to pick up a breadboard hat and introduce the complexity of an additional co-processor doesn't seem like a good fit.
    Yes, you are right about that, but, my intent is to do some functional expansion, therefore the Propeller HAT may be the answer, not completely sure about that just yet.
    I'm not sure what the issues you are having with PropellerIDE on the RasPi are.
    My issues? Since I have been doing this stuff for awhile, I have recognized the fact that the more installation steps that you introduce, the more chances of messing up creep in, especially in a Linux environment. If I pursue this any further I just may consider a SimpleIDE installation, but wait, SimpleIDE is still at 0-9-45, which raises another question, when will that be brought up to RC2 let alone a final version 1.0?

    All in all the Propeller HAT does look like it could be a very interesting project start.

    Ray
  • ratronicratronic Posts: 1,451
    edited 2015-05-07 12:30
    I have one of Bill's boards. With his board you can download firmware to run on the Propeller and on the Pi

    you install libraries for different languages that communicate with the firmware in the Propeller. The Pimoroni

    board looks like it offers the same sort of thing. So far I have just used a serial connection between the Propeller

    and the Pi for transferring data. If I had that description wrong Bill let me know as I haven't used it like that.
  • Mark_TMark_T Posts: 1,981
    edited 2015-05-07 16:29
    I picked one up at the RaspPi birthday event, but so far have just soldered the headers on.
    I know someone had it working here at Cambridge (UK) MakeSpace, but I've not had a
    project needing it yet. (Although one has borrowed the micro breadboard!)
  • ratronicratronic Posts: 1,451
    edited 2015-05-07 16:39
    The only use of a RPi and a Propeller so far for me has been vision detection with the Propeller carrying out the task of keeping

    servos on a pan/tilt platform with keeping the object in the center of the camera's view. But I probably could have done it all on the Pi.
  • Bill HenningBill Henning Posts: 6,445
    edited 2015-05-07 20:45
    The Propeller Hat looks like a nice board! I think Gadgetoid did a great job on it.

    It is aimed at a different target audience than RoboPi.

    Since there was interest in how they compare, my $0.02 is:

    Propeller Hat:

    - nice intro to programming the Propeller on a Pi
    - 30 Prop GPIO's
    - comes with easy to use breadboard
    - has an i2c "HAT" eeprom
    - programmed by SimpleIDE in Spin/Pasm/C
    - partially assembled (smt parts)
    - don't know if it has an eeprom for the prop

    RoboPi:

    - designed as an advanced robot controller / small DAQ board
    - 24 GPIO's brought to 3 pin servo-style connectors
    - GPIO's are 5V safe
    - 8 channel 12 bit analog to digital converter, to 3 pin 5V servo connectors
    - 512Kbit eeprom for propeller to boot from
    - RoboPi firmware for easy control by Pi or other SBC
    - can be programmed by SimpleIDE in Spin/Pasm/C, and PropellerIDE
    - supports all Raspberry Pi models with C & Python robotics libraries
    - supports Odroid C1, Banana Pi / Pro with C & Python robotics libraries
    - supports MIPS Creator C1 with C robotics library
    - normally ships as a kit

    David,

    You can use PropellerIDE and SimpleIDE to program the propeller on RoboPi directly if you want to roll your own code, or use RoboPi as a data acquisition board instead of using the RoboPi API.
  • GadgetoidGadgetoid Posts: 47
    edited 2015-05-08 02:36
    First off- thanks for the warm reception of Propeller HAT. It's something of an honour for my board to be in your hands!

    I have been working extremely closely with Brett to make sure that the Raspberry Pi is well looked after when it comes to Propeller IDE. I actually build and test the release packages for him at the moment. The concept of Propeller HAT is to provide a very simple and basic introduction to the Propeller chip, backed up by learning materials that I've been working on in response to the things I found hardest to get started with on the Propeller.

    We've just launched our new learning portal, which has these resources too and I hope to write many more as I gain confidence with the platform: http://learn.pimoroni.com/propeller-hat

    There's no EEPROM on the Propeller HAT, it's made with the assumption that the Pi's SD card is the best place to store your code- however, you can very easily get a DIP EEPROM and place it on the breadboard, I've done so with my own Propeller HAT boards.

    Rsadeika, I can't say if it's the board for you- but I wholly encourage you to give it a try! I've taken great pains to make sure the software is as frictionless as possible, and although it's still not where I want it to be ( No Qt5.x on Raspbian by default, for example ) it's really close.

    Thanks!
  • RsadeikaRsadeika Posts: 3,837
    edited 2015-05-08 04:33
    Rsadeika, I can't say if it's the board for you- but I wholly encourage you to give it a try!
    Before I used to think like a hobbyist, buy the item, then see where I can make it fit. Now, I am doing more of an evaluation before I even consider a purchase, maybe it was more fun, although more expensive, to be a pure hobbyist.
    There's no EEPROM on the Propeller HAT, it's made with the assumption that the Pi's SD card is the best place to store your code...
    This makes the board a pure beginners board, neither Propeller IDE or Simple IDE has the facility to do an auto program load from a non attached SD or EEPROM. Since this is the group that the Propeller HAT is after, I am really surprised that the headers were not soldered on to make it a more complete package. So, is Parallax or Pimoroni selling a 64K EEPROM than can be mounted on the breadboard? I am not knocking the product, just thinking out loud.
    I've taken great pains to make sure the software is as frictionless as possible, and although it's still not where I want it to be ( No Qt5.x on Raspbian by default, for example ) it's really close.
    Glad to see that it has NOT been taken for granted that the software SHOULD be compiled by the user prior to use. The smoother and more automatic the install, more beginners will be willing to try it out, IMO.

    I completely missed the missing EEPROM on the HAT when I was looking at the bottom side of the board, any other things that I should be aware of?

    Ray
  • GadgetoidGadgetoid Posts: 47
    edited 2015-05-08 04:55
    Rsadeika wrote: »
    Before I used to think like a hobbyist, buy the item, then see where I can make it fit. Now, I am doing more of an evaluation before I even consider a purchase, maybe it was more fun, although more expensive, to be a pure hobbyist.

    That makes sense... I've certainly got boards kicking around that I bought on impulse and have never done anything with!

    This makes the board a pure beginners board, neither Propeller IDE or Simple IDE has the facility to do an auto program load from a non attached SD or EEPROM.

    There's a Python-based uploader in the repo that will facilitate just this. In fact it can auto program load when you import a Python module- so you can "import p1.pwm" in Python and have a PWM driver module automatically uploaded to Propeller HAT.
    I am really surprised that the headers were not soldered on to make it a more complete package.

    We really wanted to do that, but we manufacture these ourselves in Sheffield and we have yet to master the art of shielding surface mount components when wave flow soldering. As you can imagine having to hand solder 64 solder joints would have significantly impacted the price, so for now we made the choice to ship it un-populated.

    So, is Parallax or Pimoroni selling a 64K EEPROM than can be mounted on the breadboard? I am not knocking the product, just thinking out loud.

    Not yet, I'll be creating a tutorial detailing how to add an EEPROM and how to use it, and I suspect we'll sell a kit of parts for doing it then. We're also looking into a more general starter kit of things a beginner might need. This is helpful feedback, thank you!
    Glad to see that it has NOT been taken for granted that the software SHOULD be compiled by the user prior to use. The smoother and more automatic the install, more beginners will be willing to try it out, IMO.

    Absolutely agreed! I'm very keen to make the software as easy as possible, since losing users to frustration before they've even played with the Propeller would be awful.
    I completely missed the missing EEPROM on the HAT when I was looking at the bottom side of the board, any other things that I should be aware of?

    The pins for uploading ( 30/31 ) are permanently tied to the UART on the Pi and not broken out for general use, this might be a problem for users looking to use all 32 IO pins.
  • Heater.Heater. Posts: 21,230
    edited 2015-05-08 04:56
    @Ray,

    A Propeller attached to a Pi can be automatically programmed on power up, or whenever, by a simple shell script that runs the propeller loader program. Or this could be done from Python or whatever language one is using for the application on the Pi. Perhaps it's best to have that application itself ensure that the Propeller is loaded when the application is started.

    @ Gadgetoid,

    Seems it would be beneficial if you provided examples of doing such Propeller Hat loading from Pi application code.
  • RsadeikaRsadeika Posts: 3,837
    edited 2015-05-08 05:08
    We really wanted to do that, but we manufacture these ourselves in Sheffield and we have yet to master the art of shielding surface mount components when wave flow soldering. As you can imagine having to hand solder 64 solder joints would have significantly impacted the price, so for now we made the choice to ship it un-populated.
    LOL :-) Road trip, a quick visit to the Arduino factory to see how they are doing it, and keeping the price of the board low. :-) LOL
    The pins for uploading ( 30/31 ) are permanently tied to the UART on the Pi and not broken out for general use, this might be a problem for users looking to use all 32 IO pins.
    For some reason I picked up on that almost immediately.

    Ray
  • GadgetoidGadgetoid Posts: 47
    edited 2015-05-08 05:36
    LOL :-) Road trip, a quick visit to the Arduino factory to see how they are doing it, and keeping the price of the board low. :-) LOL

    We have a basic idea of how- it involves metal shielding which covers over the surface mount components and protects them from the solder wave. Sooner or later we're going to have a hell of a time trying to put that theory into practice. The geometry of the shielding is vital, since it will cause a shadowing effect behind the wave if it isn't precise.

    Arduino boards don't have any surface mount components on the bottom, so they're easy peasy to solder!

    @Heater - agree regarding the examples! Such a simple thing to accomplish with the propman command-line, just a single entry in /etc/rc.local in theory.
  • Ray0665Ray0665 Posts: 231
    edited 2015-05-08 08:06
    Here is my communications package. It implements serial packet communications between the RPi and the prop and includes both the C source for the RPi side and the Spin stuff for the prop. I extracted it from my stingray based robot which uses the RPi and MSR1 board. I intend to place this in the OBEX later today. (After I clean this up a bit) To use it with the gpio tty pins just change the device from ttyUSBx to ttyAMA0. I have Bill Hennings RoboPi board and He did some excellent work with the hardware and software and he did provide some assistance with getting the tty on the RPi working. Unlike Bills package this is strictly a comm package that ensures an error free transfer, what you put in and take out of the packet is up to you.

    Edit
    This is the raw copy without much cleanup or documenting and has a few pieces of lint attached but should be quite useable with a little effort.
  • Steph LindsaySteph Lindsay Posts: 767
    edited 2015-05-08 09:40
    Gadgetoid wrote: »
    ...

    We've just launched our new learning portal, which has these resources too and I hope to write many more as I gain confidence with the platform: http://learn.pimoroni.com/propeller-hat

    ...

    Excellent! I have updated our Propeller HAT product page description to announce the portal and include links.
  • Heater.Heater. Posts: 21,230
    edited 2015-05-08 10:11
    Ray0665,

    Sounds like github is the place for your Pi-Propeller comms package.
  • Ray0665Ray0665 Posts: 231
    edited 2015-05-08 11:41
    Sorry, me no speak github, but Ill provide the source if someone else wants to do that.
  • Heater.Heater. Posts: 21,230
    edited 2015-05-08 12:18
    Ray0665,

    Many people have said that when I make the github suggestion. I have often thought about taking them up on the suggestion to take their project and do that.

    My conclusion is that it does not work.

    Consider: I take your source and create a github repo for it. A few things can then happen:

    1) People check it out and use it. That's OK. That's why we are doing that.

    2) Some of those people find bugs and report them as issues on github. Now what? Do I fix it and put a new version on github? Do I send the report to you and hope you fix it. Then you send the fixed code back for me to check in. I would probably do that as I am not familiar with the code and don't have the time to get into it.

    3) Same a gain if any one has a new and generally useful feature request.

    4) Or perhaps you fix and improve the code. Then again I have to take thane new version and check it in.

    All in all I become a project maintainer. With the added complication that the person most likely to make changes, you, is not playing the game properly and using git.

    All in all I would urge you to get familiar with git and github. It's a bit of a hassle to start with but there are some very clear getting started instructions on the github site.

    In the end you will be glad you took the trouble. I cannot work on even the smallest project without git now. It's so liberating to have it take care of various versions under development day by day, hour by hour. No matter what you break you can always go back. Being able to work on experimental branches, is great because you don't break the main line until the experiment is done. Being able to check out code and work on it no matter what machine is in front of me is just great. No worries with copying or syncing files around the place and remembering which is the last good version.

    Basically, if your code is of any value, and you value the time invested in it, then it is worth managing properly.
  • Ray0665Ray0665 Posts: 231
    edited 2015-05-08 15:50
    Or I could just put it in the obex. - - im retired....
  • Heater.Heater. Posts: 21,230
    edited 2015-05-08 18:50
    Ray0665,
    im retired
    Excellent. You have plenty of time to spend a few hours learning git :)
  • KeithEKeithE Posts: 957
    edited 2015-05-09 14:58
    There is a free Udacity course as well if you like this sort of approach:

    https://www.udacity.com/course/how-to-use-git-and-github--ud775
  • frank freedmanfrank freedman Posts: 1,983
    edited 2015-05-11 22:54
    And so far a nice easy one......
  • RsadeikaRsadeika Posts: 3,837
    edited 2015-05-14 13:08
    Has anybody been to the Pimoroni Learn site for the Propeller HAT? WOW. Maybe Parallax should hire those guys to start a PASM section. I was looking at the PASM code for doing an LED blinky, I think I started to understand PASM. :-) I like the way the code is commented, it is not terse like some of the other examples that I have seen. Now I am wondering how far Pimoroni is going to take that Learn section?

    Next example, at the Pimoroni Learn site, maybe a double(separate cogs) LED blinky, with a pause subroutine, so you could set the pin numbers and pause times in the main program, if that section is actually called that. Just thinking out loud...

    Ray
  • Heater.Heater. Posts: 21,230
    edited 2015-05-14 14:08
    Pimoroni are amazing. They started out with just this simple laser cut Raspberry Pi case http://shop.pimoroni.com/products/raspberry-pi-2-pibow
    Now they have a huge range of stuff, I want to buy it all, and a that great web site.
  • Cluso99Cluso99 Posts: 18,069
    edited 2015-05-14 18:35
    Ray,
    Nice to see you looking at PASM. It is really quite simple, mainly due to the simple and common style instruction set.
    There is also a set of examples you can work through that comes with PropTool. It takes you through flashing a LED to using multiple cogs to do multiple LEDs.

    However, you will find you only need to do a small percentage of your code in PASM. The rest is usually not required to be fast, and so spin (or C) can be used for that.

    So, what are you waiting for? Dig in, and as questions if you don't understand something.
  • RsadeikaRsadeika Posts: 3,837
    edited 2015-05-15 04:05
    So, being like everybody else, I am thinking, what do I do with a Propeller HAT. Sticking in a couple of LEDs and then making them blink, hmm, I'm bored, been there done that. At the basic level, the Propeller HAT has a capacity to expand the capabilities of the Propeller. I am thinking the RPi as a helper device for the Propeller, just think about what it takes for the Propeller to use an uSD device.

    If you use the HAT as sensor source, the Propeller does the actual accessing to the sensors, and the RPi as the user source, you decide what info you need from the sensors, what is the missing link? The key component is the software on the Propeller to allow for accessing the sensors for the info that you need. Does this mean that the Propeller program has to have its own little OS, to communicate with the RPi, or is their than easier way of doing this? My thoughts, a little PASM program that has the communication protocol plus code for controlling the attached devices.

    Now that is something to think about...

    Ray
  • Heater.Heater. Posts: 21,230
    edited 2015-05-15 04:54
    Rsadeika,

    All you need on the Propeller to talk to the Pi is a serial driver like the FullDuplexSerial object in OBEX. There are many others to choose from. You talk between Prop and Pi in the same way as we might talk between Prop and PC over a USB/serial adapter or PropPlug.

    Similarly for whatever sensors and other hardware you have connected to the Prop there are probably drivers in OBEX and elsewhere for most things you would like to use today.

    All in all on the Prop side it is just business as usual. No operating system or other complication required.
  • RsadeikaRsadeika Posts: 3,837
    edited 2015-05-15 06:44
    I am leaning towards a quick and dirty experiment, since I do not have a Propeller HAT I will use a QS board for this. So, what I want to do is, using a short bash program on the RPi, turn on/off the P16 LED on the QS board for a specified length of time that would be designated in the bash program. The delay time control would be part of the Propeller program, no cheating by using any functions on the RPi side. Of course on the Propeller side all of the code will be in PASM.

    The above description is a very generalized way of using the Propeller HAT. The LED is the sensor for this test, later on you could just add whatever you want. Below is some code for the Propeller side, which of course compiles, but does not do what I want, delay for a specified time. I am using Propeller IDE, which at some point I will have to use it on the RPi.

    Ray
    'test1.spin
    CON
      _CLKMODE = xtal1 + pll16x
      _XINFREQ = 5_000_000
    
    MY_LED_PIN = 16
    'Pause = 80_000_000
    
    PUB Start
      cognew(@LED1, 0)
    
    DAT
        org 0
    LED1   mov     dira,   Pin
           rdlong  Delay,  #0
           mov     Time,   cnt
           add     Time,   #9
    :blink mov     outa,   1
           jmp #:loop
           mov     outa,   0
           jmp #:blink
    :loop   
           waitcnt Time,Delay
    ret     
    Pin     long    |< MY_LED_PIN
    Delay           res     1
    ''Delay   long   |< Pause
    Time            res     1
    
      fit 
    
  • RsadeikaRsadeika Posts: 3,837
    edited 2015-05-15 13:06
    This is now on hold for me until Propeller IDE becomes less quirky, at least for me. I am now using the Propeller Tool for some PASM stuff, at least the programs will be portable to the Propeller IDE once that gets to a very stable point.

    Ray
  • Cluso99Cluso99 Posts: 18,069
    edited 2015-05-15 15:43
    Ray, all the RES must be at the end, not mixed with Longs etc. it's easier to start with just using longs until you need the space and get more experience.
Sign In or Register to comment.