Shop OBEX P1 Docs P2 Docs Learn Events
Programming Propellers from iPad - Page 11 — Parallax Forums

Programming Propellers from iPad

18911131418

Comments

  • Heater.Heater. Posts: 21,230
    edited 2013-11-06 13:13
    fixmax,
    You want to show off all the cool things that can be done with a Prop? Get it into the RPi communities hands. You'll see an exponential amount of people using Props that may never even have heard of Parallax.

    Yes !

    I have been trying to say that here for a long while. Prop and Pi are not competitors. The Prop can leverage that huge Pi community who really need the real-time I/O ability. The Pi can run all the dev tools for the Prop. It's a perfect match.
  • potatoheadpotatohead Posts: 10,261
    edited 2013-11-06 13:17
    Completely agreed.

    In fact, I am mentoring somebody who has both a Pi and Prop based things. Right now, they find the Prop direct, easy, potent, robust. When they eventually expand beyond what a Prop can do, assuming P2 doesn't raise the bar either, connecting a Prop to a Pi will be a no brainer. Once a good protocol is worked out, using the two like that will be very attractive.
  • Heater.Heater. Posts: 21,230
    edited 2013-11-06 13:21
    Ken,
    I have yet to see a RasPi (or other small Linux board) set up to edit, load and run programs in a Propeller. But I think I'll be seeing this pretty soon.

    Get a Pi. Get your Propeller dev system for the Pi from here:

    https://dl.dropboxusercontent.com/u/81267937/SimpleIDE-0-9-43.armv6l.raspberrypi-linux.tar.bz2

    That is propgcc and SimpleIDE compiled fro the Pi. Can't remember if I included the Open Source Spin Compiler in that package.

    I will be building a new version soon as I understand that BSTC is no longer required, which does not run on the Pi.

    I'm also working on the mods to the loader to allow loading of the Prop from the Pi via the UART on the Pi's GPIO header. No USB serial adapter required.
  • jmgjmg Posts: 15,173
    edited 2013-11-06 13:22
    Heater. wrote: »
    @ Loopy, I always have to wonder why you have such a downer on the Raspi. It's been put together by honest, hardworking and good people with good intentions and at zero profit to themselves. It happened to take off wildly not through any "hype" on their part. I don't understand the negativity toward the Pi. It's educational and it's fun. It has a great community following, like Parallax and the Arduino. If it does not do what you need it to do then fine, use something that does.

    I think it is good to look at what comes after rPi, on the support ladder.

    The quite new CubieBoard3, looks to have enough feature separation to be worth looking at.
    ( CubieBoard2 is a little bit me-too.)

    The CubieBoard3 has Wifi+BT wireless connection with antenna on-board, and also a VGA connector, and more storage,
    so Ken may be able to host the Learn.parallax.com pages, if he wants to side-step IT inertia.

    I also like the optical interface.
  • mindrobotsmindrobots Posts: 6,506
    edited 2013-11-06 13:28
    Ken Gracey wrote: »
    I have yet to see a RasPi (or other small Linux board) set up to edit, load and run programs in a Propeller. But I think I'll be seeing this pretty soon.

    I think Mr. Gately accomplished a proof of concept of that here.

    Heater., you don't have OpenSpin in your last build but it builds vary simply on the RasPi (once you grab the latest version :innocent:)

    If we add some Spin syntax highlighters for your favorite editor (or webIDE), you should be good to go.
  • jmgjmg Posts: 15,173
    edited 2013-11-06 13:30
    Ken Gracey wrote: »
    ...
    One thing that comes to mind about this setup that could be very beneficial is that it doesn't require any school IT staff. Dealing with school IT systems is a real headache. From the internet access, software installation privileges, virus contamination, Facebook access, etc. students and teachers loose a lot of time.

    Something like a RasPi has no interest from most school IT programs. It's just a little PCB-thingie...at least until it connects to the internet. A RasPi<=Propeller interface wouldn't require any help from an IT department, and could be a limited system that students couldn't also browse the web (but they DO need access to Learn.parallax.com unless educators print out the pages, or the teacher could put it up on the big screen). There are some benefits to the approach.

    Interesting angle.

    How large is Learn.parallax.com ?

    If you want to disable general internet access, or at least school-pathway-internet-student, then a local host for the web pages seems natural ? (what students do in their own time is up to them, and I would not expect any students in thee classes to be challenged finding their own internet paths!) - but I can understand schools wanting to not have an official connection.
  • Heater.Heater. Posts: 21,230
    edited 2013-11-06 13:33
    I have no beef with Cubies or Beagles or IGEPs or whatever. Given time I would try them all!

    I do hope that whatever Parallax comes up with is future proofed. It should work on any and all of those boards and others that have not been made yet.

    Parallax has made huge strides into the open source world with propgcc, SimpleIDE and the Open Source Spin Compiler. I would hate to see a return to the old closed, single platform, monopoly supplier.

    Just hang up the phone on those Apple guys:)
  • fixmaxfixmax Posts: 91
    edited 2013-11-06 13:37
    jmg wrote: »
    You seem to presume this is a single choice.

    The Pi is an obvious first step, and this thread already has working examples, but to say it is the only one is like saying there should be only one Phone, or PC out there.

    There may even be a natural split, of Small-Host choice, based on class size and resources needed.

    Who said anything about a single choice? Go buy your Udoo, or BBB, or PCDuino, or Cubieboard, whatever. I was simply bringing up the huge Rpi community and why I think it might be a good thing to latch onto with the Prop.
  • Heater.Heater. Posts: 21,230
    edited 2013-11-06 13:38
    @jmg,
    How large is Learn.parallax.com ?
    No idea, but I bet a Pi class machine can serve it up a dozen times before it even gets rendered in a browser on a tablet.

    @mindrobots,

    Yes. Mr. Gately has shown how it should be done. And in short time too.

    I'm not sure what the best WEB IDE might be. Try them all.
  • jazzedjazzed Posts: 11,803
    edited 2013-11-06 13:46
    Heater. wrote: »
    I have been trying to say that here for a long while. Prop and Pi are not competitors. The Prop can leverage that huge Pi community who really need the real-time I/O ability. The Pi can run all the dev tools for the Prop. It's a perfect match.
    Tell us about all the applications that are possible on a Propeller that are not possible on an RPi.

    That is, what extra real-time IO examples does Propeller enable that RPi can't do by itself?
  • mindrobotsmindrobots Posts: 6,506
    edited 2013-11-06 13:46
    Best webIDE? Why, the one that hasn't been written yet. :smile:

    It may need to be a mashup of features from those based on ACE and how folks want it to look and feel (coder is different from cloud9 is different from webIDE). It sounds like there might be some issues with the difference between a mouse driven cursor and a finger driven cursor. The actual interface to the user might need to tweaked in ACE to handle "mobile" users better.
  • Heater.Heater. Posts: 21,230
    edited 2013-11-06 14:02
    Jazzed,
    ...what does Propeller enable that RPi can't do by itself?
    The Pi only has a hand full of GPIO pins. That's nice for flashing a LED or turning a relay on and off but that's about it. Bit banging on those pins is severely limited by the Linux operating system that most Pi's run. Linux is really not for microsecond resolution real-time control.

    So what about some examples:

    a) So you want to control half a dozen PWM servos for your robot. That's easy for the Prop whilst the Pi is running your robot brains in Python or whatever.

    b) How about a VGA display output for your creations. Or just as a Linux console output. Prop can do that easily.

    c) All manner of devices that are hard to interface to the Pi directly can be delegated to a Prop.

    d) What about those analog inputs you might have, or outputs for that matter.

    e) Most basically the Prop can supply 28 extra I/O pins.

    f) and so on...
  • Mike GreenMike Green Posts: 23,101
    edited 2013-11-06 14:04
    Microchip (Roving Networks) has an RN-41/RN-42 variant that includes firmware support for the Apple authentication chip and allows straightforward linking with an iGadget over Bluetooth. You have to be a member of MFi to order the device and the authentication chip. The iGadget could run the complete IDE and there'd be a simple Bluetooth interface to the Propeller's programming pins using Rx and Tx for data and one of the GPIO pins for the reset. If the timing doesn't work out, the Propeller could use the downloading protocol used by the Propeller Backpack with a loader pre-loaded into the EEPROM.
  • Jeff MartinJeff Martin Posts: 758
    edited 2013-11-06 14:05
    Heater. wrote: »
    Yes !
    I have been trying to say that here for a long while. Prop and Pi are not competitors. The Prop can leverage that huge Pi community who really need the real-time I/O ability. The Pi can run all the dev tools for the Prop. It's a perfect match.

    I never thought of Prop and RPi as competitors once I learned what the RPi really was, but I also didn't know about the issues with RPi I/O until yesterday and this morning (thanks to you Heater, and Oldbitcollector). That makes real sense and the points you've brought up along the way are settling in.

    We have an RPi and will be running your latest SimpleIDE build (just downloaded it)!
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-06 14:08
    Heater. wrote: »
    The Pi only has a hand full of GPIO pins. That's nice for flashing a LED or turning a relay on and off but that's about it. Bit banging on those pins is severely limited by the Linux operating system that most Pi's run. Linux is really not for microsecond resolution real-time control.
    Could you get around this by writing a Linux device driver rather than trying to flip the bits from user mode?
  • Heater.Heater. Posts: 21,230
    edited 2013-11-06 14:10
    Cool.

    If one of my generation is allowed to say so:)
  • fixmaxfixmax Posts: 91
    edited 2013-11-06 14:10
    My biggest reason would be how few pins there are on the Pi.
  • jmgjmg Posts: 15,173
    edited 2013-11-06 14:12
    David Betz wrote: »
    Could you get around this by writing a Linux device driver rather than trying to flip the bits from user mode?

    Only to a limited extent.

    Try Quadrature Encoder counting, or PWM generation, or Multi-Serial, or Reciprocal Frequency Counting, via a Linux device driver

    Where a Linux device driver could make good sense, is to allow some faster OS calls, to a Prop slave.

    What serial choices at what speeds does rPi have on the IO pins ?

    Addit : I can see i2c and UART and SPI and i2s
    Specs give
    "Mini UART Baud = SysClk/(8*(BaudReg+1)) SysClk 250MHz No DMA
    Main UART Baud = not given, seems to have (/16*(16b_Div.6b_Fract)
    i2s - looks fixed to 3.072MHz Clk ? - has DMA and Duplex 2 x 64x32 FIFOs
    SPi - Clock set by SysClk/(2*(12b.SpiDiv+1)) 4 x 32 fifos, no DMA ?
    i2c - mentions 400kHz speed, but can likely go higher (1M, 3.4M ?)
  • David BetzDavid Betz Posts: 14,516
    edited 2013-11-06 14:18
    jmg wrote: »
    Only to a limited extent.

    Try Quadrature Encoder counting, or PWM generation, or Multi-Serial, or Reciprocal Frequency Counting, via a Linux device driver
    Right, you can't get hard realtime under Linux by itself. Better to leave that to the Propeller shield (plate?) that Parallax is going to make for us! :-)
  • Heater.Heater. Posts: 21,230
    edited 2013-11-06 14:21
    David,
    Could you get around this by writing a Linux device driver rather than trying to flip the bits from user mode?
    I have thought about this. I have even managed to write such kernel device drivers in the past.

    All in all I don't think it buys you much over memory mapping the port registers to user space or accessing via /sys/whatever it is. (Both techniques worked for the prop loader on the Pi, tweaking the Props reset, when I tried them)

    Consider bit banging a UART. Not that you would want to do that, but something similar. In order to get any speed out of it you would want to poll the GPIO input very quickly all the time. Great, now you have no time for anything else to run.

    Or you would hook an interrupt to the GPIO input. Gak, horrible complicated and slow. If a lot of data is coming in you have hung up all the rest of your OS again.
  • Heater.Heater. Posts: 21,230
    edited 2013-11-06 14:26
    jmg,
    What serial choices at what speeds does rPi have on the IO pins ?
    The Pi has a single UART Tx and Rx on the GPIO expansion header. No idea what the max speed is but enough for the Pi to Prop link I am sure.
    I have used that UART to program Propellers from SimpleIDE. Works a treat.
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2013-11-06 14:42
    Who cares if other boards are better than the Pi?? The thing will be in a box anyway and nobody will see the board. The important question is 'is it capable of doing the job I need done'?'

    So what if the Pi just bit bangs some serial and is bad at PWM. It just needs to send serial to an xbee.

    The only concrete reason I've seen so far that argues in favor of NEEDING a more powerful board is mention of one with Wifi and an antenna built in. Can that be used as an access point from which to serve the web pages for the ide and reference materials??? If so, I want to learn more about that board.

    You certainly want stand alone wifi hotspot because you want to stay off the school IT network. There are too many problems there.

    I think it best to not rely on any capabilities for iPad that are locked down or require special steps. Safari works great to view webpages - problem solved. What is also nice, is that a kid can bring in an android, or surface or blackberry tablet (yeah right) or whatever and be able to instantly get started doing stuff with the activity bot.
  • jazzedjazzed Posts: 11,803
    edited 2013-11-06 14:49
    Great. So, RPi won't "completely" replace the Propeller chip or other MCUs ;)

    Of course there are MCUs that can run Linux too, but that's another story.

    Any computer can do the job that RPi is being positioned to do here. However, it is easier to package one or more RPi server products.

    Heater. wrote: »
    The Pi only has a hand full of GPIO pins. That's nice for flashing a LED or turning a relay on and off but that's about it. Bit banging on those pins is severely limited by the Linux operating system that most Pi's run. Linux is really not for microsecond resolution real-time control.
  • jmgjmg Posts: 15,173
    edited 2013-11-06 15:57
    Heater. wrote: »
    jmg,

    The Pi has a single UART Tx and Rx on the GPIO expansion header. No idea what the max speed is but enough for the Pi to Prop link I am sure.
    I have used that UART to program Propellers from SimpleIDE. Works a treat.

    I was thinking about what the limits are - speed is always good.

    I found this http://www.raspberrypi.org/wp-content/uploads/2012/02/BCM2835-ARM-Peripherals.pdf
    Specs give
    "Mini UART Baud = SysClk/(8*(BaudReg+1)) SysClk 250MHz No DMA
    Main UART Baud = not given, seems to have (/16*(16b_Div.6b_Fract)
    i2s - looks fixed to 3.072MHz Clk ? - has DMA and Duplex 2 x 64x32 FIFOs
    SPi - Clock set by SysClk/(2*(12b.SpiDiv+1)) 4 x 32 fifos, no DMA ?
    i2c - mentions 400kHz speed, but can likely go higher (1M, 3.4M ?)

    Be interested to know if that Full Baud granularity is available from the OS/Scripts ?
    - and what the Prop ROM loader baud range is ?
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-11-06 16:44
    jazzed wrote: »
    Great. So, RPi won't "completely" replace the Propeller chip or other MCUs ;)

    Raspberry Pi doesn't replace my Propeller any more than my full tower Linux Mint machine does.. . Not sure where that fear is coming from...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-11-06 16:49
    These things are cheap as dirt:

    They have WiFi, Ethernet, USB host connector, and internal 115200 3.3V serial. They can run the OpenWRT version of Linux:

    I would bet they can be co-opted to run a webserver and to program a Prop.

    -Phil
  • jmgjmg Posts: 15,173
    edited 2013-11-06 17:18
    These things are cheap as dirt:

    They have WiFi, Ethernet, USB host connector, and internal 115200 3.3V serial. They can run the OpenWRT version of Linux:

    I would bet they can be co-opted to run a webserver and to program a Prop.

    -Phil

    Cute, and cheap, but it says this
    ["USB port and monitoring Serial Console via USB-Serial

    The USB port on the WR703n is not compatible with USB1 devices (aka full speed) and only works properly with USB2 (aka high speed) devices. You can however plug a USB-Serial adapter as long as you plug that through a <$10 USB2."]

    and also this

    [" Two pads labelled TP_OUT and TP_IN are the TX and RX signals. 115200 8n1

    Note that the pads can very easily be lifted. There is slightly more mechanical strength if you can solder to the surface-mount components to which the pads are connected–but this also takes care–your device could easily be destroyed. Make sure that your connection is secured so that tension cannot be applied to the solder points when you connect to an external device. "]

    and it seems to have
    4 MB flash memory
    32 MB RAM

    which might be a little light to use as a server/compiler/toolchain, but probably ok as a wifi loader.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-11-06 17:34
    jmg wrote:
    and it seems to have
    4 MB flash memory
    32 MB RAM

    which might be a little light to use as a server/compiler/toolchain, but probably ok as a wifi loader.
    Webpages could be served from a USB2 thumb drive plugged into the USB port.

    Reports of pads that are easily lifted don't concern me much, since it's hard to know who made that evaluation. In my early ham-fisted years, ALL pads were easily lifted. :)

    -Phil
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-11-07 06:14
    Who cares if other boards are better than the Pi?? The thing will be in a box anyway and nobody will see the board. The important question is 'is it capable of doing the job I need done'?'

    So what if the Pi just bit bangs some serial and is bad at PWM. It just needs to send serial to an xbee.

    The only concrete reason I've seen so far that argues in favor of NEEDING a more powerful board is mention of one with Wifi and an antenna built in. Can that be used as an access point from which to serve the web pages for the ide and reference materials??? If so, I want to learn more about that board.

    You certainly want stand alone wifi hotspot because you want to stay off the school IT network. There are too many problems there.

    I think it best to not rely on any capabilities for iPad that are locked down or require special steps. Safari works great to view webpages - problem solved. What is also nice, is that a kid can bring in an android, or surface or blackberry tablet (yeah right) or whatever and be able to instantly get started doing stuff with the activity bot.

    In the context of this project, I just feel the Raspberry Pi is not starter. It is highly likely to bog down the teaching agenda.

    If you have a classroom of 25 wifi iPads sharing one Raspbery Pi server, what is going to be the outcome. Cubieboard might do better, but the real solution is a LInux machine of larger scale and faster speed.

    My ire comes from there being huge unrealistic expectations raised by Raspberry Pi, when the prime innovation they have provided is a delivering a $25 micro-computer. Everything else is borrows - the concept of a credit card size computer (which I am wary of as too small), the use of OpenAVR, the Linux and Android OSes, the money to make the darned things.

    This is a Linux wifi server project first and foremost and doesn't require the GPIO on the Pi.

    As far as millions of users out there to help... Linux has even more and would be relied on more than the average Pi user to get this project going.

    There has just been a lot of marketing talk about the Raspberry Pi/Parallax Propeller partnership being some sort of synergy. It mostly distracts Parallax users from a wonderful deterministic microCONTROLLER that is adequately supported with their existing microComputer and that can be mated with any Linux computer.

    To get a good iPad solution, any Linux server will do well. And with more Ram, more speed, and a harddisk; the teacher in charge will not be having serious concerns of slowness due to inadequate resources, breakdowns due to having to DIY a power supply and enclosure, and so on.

    Good is the enemy of Best in this case --- a Linux laptop with Wifi built-in would be more stable and more acceptable to a real teacher with a classroom full of students in a rush to get their code compiled.

    I have been a teacher and can see the difference between a real educational tool and a toy.

    The primary educational value is of being a 2nd Linux microcomputer system that can be explored and broken to that the user can learn how to avoid such straits on their primary Linux system. But you don't have to have a Pi to have a second Linux OS either... any old PC that works can do the job.

    A Linux wifi server is a wonderful way to get around the iPad moat in a wireless configuration

    The Propeller/Raspberry Pi partnership is a separate topic. But the Propeller is a deterministic microcontroller that offers huge insights into low-level code writing, and the RaspberryPi is a microcomputer with a few GPIO pins that is dependent on Linux or Android. They have completely different educational aspects.... I am not sure that any true synergy might emerge. I just study Linux when I want Linux.
  • mindrobotsmindrobots Posts: 6,506
    edited 2013-11-07 07:27
    @Loopy,

    I think the point is that the RasPi IS a STARTER. Maybe not the final solution but it sure was easy to start building a proof of concept with at least 3 different people trying things so far.

    Yes, I have a more powerful Linux Server I could start building this on. Yes, that may be the better solution for some size audience. But it sure was easy to make a fresh SD with a clean Linux distro on it and boot up a Pi and start loading and playing with the software pieces. Once the pieces are all tested, it should scale to any sized Linux server relatively easily.

    Until we get something up and running we really won't know how anything scales or what loads can be handled by a RasPi. I don't think you can throw it by the wayside just because it might not be the final platform.
Sign In or Register to comment.