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

Programming Propellers from iPad

1235718

Comments

  • Don MDon M Posts: 1,647
    edited 2013-10-31 15:56
    LiPo batteries could provide enough power for quite a while. Batteries are not an issue here.
  • RaymanRayman Posts: 13,860
    edited 2013-10-31 15:59
    Don M wrote: »
    Correct me if I'm wrong but then you'd need some bootloader or such in the tergat Prop. What if I don't have room for that? I would prefer something that is self contained and allows the Prop to have total freedom with code space memory and not be tied down to some operating system.

    Brian Riley's bootloader (in OBEX) actually stores the target code in the upper 32k of a 64k eeprom.
    So, there is zero footprint...
  • Don MDon M Posts: 1,647
    edited 2013-10-31 16:03
    Rayman wrote: »
    Brian Riley's bootloader (in OBEX) actually stores the target code in the upper 32k of a 64k eeprom.
    So, there is zero footprint...

    So then you are tied to newer designs that now use the 64k eeprom. What about legacy devices or products?

    This "programming adaptor" whatever it turns out to be needs to be as universal as possible so as not to limit it's use.
  • RaymanRayman Posts: 13,860
    edited 2013-10-31 16:07
    I think all Parallax boards use a 64kB eeprom chip. I've only heard of a few others making boards with 32k eeproms....
  • Don MDon M Posts: 1,647
    edited 2013-10-31 16:09
    I seem to remember some Quickstarts that only had 32k. What about the new Propeller Mini? Wasn't there a recent thread about changing from a 32k device to 64k?
  • Don MDon M Posts: 1,647
    edited 2013-10-31 16:10
    Don M wrote: »
    This "programming adaptor" whatever it turns out to be needs to be as universal as possible so as not to limit it's use.

    Seems we're getting off topic here. I still firmly believe in my point above.
  • RaymanRayman Posts: 13,860
    edited 2013-10-31 16:10
    The very first ones only had 32k, but then several of us lobbied hard for the 64k chip and they listened...
  • Don MDon M Posts: 1,647
    edited 2013-10-31 16:14
    Rayman wrote: »
    The very first ones only had 32k, but then several of us lobbied hard for the 64k chip and they listened...

    That's not my point here- the fact that ANY boards or products that only have 32k eeprom are instantly discarded. That's why it needs to be agnostic to eeprom size. Anyway... enough from me regarding this....
  • RaymanRayman Posts: 13,860
    edited 2013-10-31 16:18
    You could use this with a 32k eeprom, but you'd lose about 2k for FSRW and sd reading code, unless you already planned to use it...

    I'll admit this approach is far from ideal. But, with an iPad your options are very limited in this regard...
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2013-10-31 16:33
    Hello Ken,

    Apple does not want to play with you. They don't want people programming on the iPad and hacking things. My idea of a web server based computer could probably support 16 computers and microcontrollers on one Raspberry Pi or BeagleBone. The IDE is on the tiny computer which serves websites editors to all the iPads in the classroom. The iPads use unmodified Safari browser. All the editing, compiling and sending to the propellers happens on that single Linux computer board. Easy peasy. Adding in circuitry to do it wirelessly (aka Dr. Acula's demonstrations w/ 12 blocks) will allow kids to use their iPad, or anything else, right next to their robot. Hit the RUN button and have the compiled program run right in front of them. They may not even notice that it isn't the iPad that did all the work.

    Not only that, you've got a new product to sell to classrooms. The Parallax Wireless Classroom Robotics Workshop or something.
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-10-31 16:39
    Ken Gracey wrote: »
    I've been an internal advocate of keeping USB FTDI hardware on each board, unless it's a consumable item (like a Propeller Project Board) where we shouldn't force the customer to buy the same thing over and over again. For boards we consider more like development tools, where you only need one of them, I always insist it be present.

    The big drawback is the one you mentioned: USB serial enumerations! I have to admit we hadn't taken that important detail into account very often.

    A good point for us to carefully consider, ctwardell. Thank you for bringing it back to the surface.
    Ken,
    I would advocate that you do as I did on the TriBlade - the USB+FTDI is brought out to one side of a 2x4 pin header. The other side is the input to the prop. 3 shunts are used (don't need the gnd shunt as these are connected. This gives the user a PropPlug plus the PropPlug input. This is the best of both worlds.
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-10-31 16:59
    Cluso99 wrote: »
    Lots of good discussions going on here. Let's break it down to functional blocks...
    1. Need to edit code - easily done as it can be a text file, or you could use a browser (remember someone did a colored browser to highlight the syntax and html). The file can be local or on the web. No problems for either, and iPad, Android, PC, Linux, Mac compatible.
    2. Need to compile - how about this be done over the internet with a server (sort of like I think Jeff is getting at - I only skimmed this thread).
      • Now - over the internet
        • Perhaps someone could set this up on a pc server at Parallax. Might be slower, but gets it working sooner.
        • Can look at other things later.
        • The school could even hang a wifi pc server to do the compiler if setup was easy (almost any old pc would do the job. Linux would be cheapest)
      • Later - maybe on the iPad, etc
    3. Need to download. Needs to be cost effective. IMHO This is where the initial focus should be.
      • What cost per student would be acceptable??? (yes, I know $0)
      • All wireless solutions are going to cost $$$
      • Is there a way to use the iPad USB port??
        • If yes, perhaps a small pcb with USB OTG functionality that connects to the prop board
    I think we are back here???

    So let's solve how we download (via WiFi preferably??) to the Prop first.

    PS Ken, perhaps you could update your first link with the Activity Bot link?
    http://www.parallax.com/product/32500
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-10-31 17:14
    I don't like the idea of adding a R-Pi to the mix. Sort of implies they should be using/programming a R-Pi instead of Propeller :(

    Here are some alternative thoughts...
    All these are reasonably priced, readily available, and run *nix, and are commonly hacked...

    WR703N WiFi Router ~$25
    http://www.ebay.com.au/itm/Mini-Portable-Nano-TP-LINK-TL-WR703N-150Mbps-WiFi-Wireless-Router-DR-/350809202674?pt=LH_DefaultDomain_0&hash=item51addb9ff2

    MK802 Android Dongle ~$40
    http://www.ebay.com.au/itm/Mini-MK802-Android-4-0-Google-TV-Box-HD-IPTV-Player-PC-Allwinner-A10-1G-DDR3-/221247151668?pt=US_Internet_Media_Streamers&hash=item33835b9e34

    Could they be used/hacked to do the compiling via wifi (iPad or Android or even laptop/pc+wifi) and download to the Prop?

    For the MK802, perhaps SimpleIDE & PropGCC could run on this Android box without modification. Could the iPad be used as a wifi terminal to Android??? IIRC the prop could be plugged into the MK02 USB OTG port, and so downloading would be solved I think.
  • David BetzDavid Betz Posts: 14,511
    edited 2013-10-31 17:39
    Don M wrote: »
    I seem to remember some Quickstarts that only had 32k. What about the new Propeller Mini? Wasn't there a recent thread about changing from a 32k device to 64k?
    The Propeller Mini only has a 32k EEPROM but there was some indication (from Nick?) that the next build would use 64k EEPROMs.
  • dgatelydgately Posts: 1,621
    edited 2013-10-31 18:08
    Heater. wrote: »
    This can for sure be done as the Beagle Bones already use Cloud 9 as an on board web based IDE.

    Just remember that at least for the Beagle Bone Black, they do not allow commercial products using the board. The Black is considered a prototype board for the chipset, which TI wants to sell. So, Raspberry Pi is more likely for this use.

    dgately
  • Mike GreenMike Green Posts: 23,101
    edited 2013-10-31 18:14
    There is no reason why it can't be a requirement of this project that any Propeller being used has at least 64K of EEPROM and has a PropPlug-type interface for programming (Rx, Tx, RST, Gnd). You would need a WiFi interface for programming. This could be done with a RN-XV module or a small board with a RN-171 module. The Propeller's EEPROM would be preprogrammed much like the Propeller Backpack with a loader. The compiler could run on the iPad or on a server in the "cloud" (which could be an R-Pi or other Linux box) and either the iPad or the server would connect via a LAN to the WiFly module for downloading. The main issue there would be to configure the IP addresses so the iPad would talk to the right Propeller board. That might be done with a PC-based configuration program that would be run to set things up. There are already IOS programs that incorporate a program editor and compiler. Given similar App Store programs and that the Internet is used to deliver the resulting object file and no iPad or iPhone hardware is needed, I don't see any problem with Apple ... It's just another App.

    For a more complex solution, you could talk to Roving Networks about a custom program for the WiFly module that would use FTP to deliver an object file to the module's EEPROM, then download it to the Prop using the standard ROM bootloader and automatically drop back into data mode to serve as the console (via the Telnet connection to the iPad). You could also partner with Mocha for a special version of their Telnet Lite that would do the FTP file transfer. As I've mentioned before, any IDE / compiler could send its object program to the special Mocha Telnet Lite App much like the existing IDE starts up the terminal program.
  • Don MDon M Posts: 1,647
    edited 2013-10-31 18:22
    Cluso99 wrote: »
    I don't like the idea of adding a R-Pi to the mix. Sort of implies they should be using/programming a R-Pi instead of Propeller :(

    Here are some alternative thoughts...
    All these are reasonably priced, readily available, and run *nix, and are commonly hacked...

    WR703N WiFi Router ~$25
    http://www.ebay.com.au/itm/Mini-Portable-Nano-TP-LINK-TL-WR703N-150Mbps-WiFi-Wireless-Router-DR-/350809202674?pt=LH_DefaultDomain_0&hash=item51addb9ff2

    MK802 Android Dongle ~$40
    http://www.ebay.com.au/itm/Mini-MK802-Android-4-0-Google-TV-Box-HD-IPTV-Player-PC-Allwinner-A10-1G-DDR3-/221247151668?pt=US_Internet_Media_Streamers&hash=item33835b9e34

    Could they be used/hacked to do the compiling via wifi (iPad or Android or even laptop/pc+wifi) and download to the Prop?

    For the MK802, perhaps SimpleIDE & PropGCC could run on this Android box without modification. Could the iPad be used as a wifi terminal to Android??? IIRC the prop could be plugged into the MK02 USB OTG port, and so downloading would be solved I think.

    I disagree. What's the difference whether you use a Pi or the MK802? They are basically the same thing in terms of a SBC. So the same argument could be made for not using the MK802 same as the Pi.
  • RaymanRayman Posts: 13,860
    edited 2013-10-31 18:30
    Just a note about WiFly... I tried every SD card code I could find with it and none of them worked...

    The FlashAir worked just fine though.
  • jazzedjazzed Posts: 11,803
    edited 2013-10-31 18:43
    https://www.sparkfun.com/products/10822

    That doesn't have an SD Card. The web site has a little ghost today though.
  • David BetzDavid Betz Posts: 14,511
    edited 2013-10-31 18:48
    Rayman wrote: »
    Just a note about WiFly... I tried every SD card code I could find with it and none of them worked...

    The FlashAir worked just fine though.
    What did you plug the FlashAir into? The only Propeller board that I have that has a full size SD card slot is my Dracblade.
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-10-31 22:19
    Don M wrote: »
    I disagree. What's the difference whether you use a Pi or the MK802? They are basically the same thing in terms of a SBC. So the same argument could be made for not using the MK802 same as the Pi.
    The R-Pi in many ways is in opposition to Parallax - targeting the education market. Same would apply if you used an Arduino to do the interface. Best to avoid putting the oppositions products in the hands of your target audience.
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2013-10-31 22:48
    Any small Linux box should work. The pi is a bit short on digital outputs. A mini Linux web server version will do the trick and meet all ken's requirements. I didn't know about the commercial limitations on the beagle thingy. We could also maybe do it on the new Intel based arduino or prop 2 if it ever comes out.
  • Heater.Heater. Posts: 21,230
    edited 2013-10-31 23:30
    Cluso,
    I don't like the idea of adding a R-Pi to the mix. Sort of implies they should be using/programming a R-Pi instead of Propeller
    I do see your point.

    However those dongles you link to and others suggested here are more expensive or at least similarly priced as a Pi whilst being orders of magnitude less useful and harder to work with.

    With the Pi solution you can throw the iPads in the bin where they belong and use the Pi as the development machine:)

    Also don't forget, and his is BIG, there will very soon be 2 million Pi in use around he world. Any solution Parallax comes up with to solve this threads problems with a PI also puts the Propeller on the radar of all those Pi users. Many of whom will be in an educational setting.
    The R-Pi in many ways is in opposition to Parallax - targeting the education market.
    I see it exactly the opposite way. The Prop and the Pi are so very different they can not be in competition. They are complimentary.

    Leveraging the awareness of the Pi that exists around the world to introduce the Prop may well grow the Prop market.

    This is not true of Arduino.

    Invent-O-Doc,
    Any small Linux box should work. The pi is a bit short on digital outputs.
    True. That is the beauty of the plan to use the Pi. The Pi is great for the networking, Prop loading, compiler running, IDE hosting etc.
    BUT it is severely limited in GPIO and real-time capabilities.
    Exactly where the Propeller shines.

    Perfect symbiosis!
  • Heater.Heater. Posts: 21,230
    edited 2013-11-01 00:48
    Brucee,

    From way back in post #78
    While JS gives up classes, I wonder if the objects still create the bloat of most object oriented languages.
    This is a little off topic quibble but I can never let statements like this pass.
    I don't know about most oop languages but using objects in C++ and Object Pascal does not introduce any bloat.

    The idea that C++ necessarily implies bloated programs is a myth.

    For sure you can program using classes and objects in C++ with no more overhead than you would incur achieving the same effect in straight up C with functions and structure pointers being passed on each function call. If you write the same functionality in C with functions and struct pointers or C++ and objects you can get byte for byte the same executable code. I have tried it, sadly of I don't have my example code any more. Of course if those instance pointers are too much overhead and you only need one instance, why are you creating objects for it? In either language.

    Similarly C++ has many other features, like templates, that can be used with zero overhead. If you need that kind of feature in your program you will get the same kind of code in hand made C.

    C++ is so "not bloated" that it is the language used to program Arduinos, with classes and objects, which are only very small AVR micro-controllers.

    (I do draw the line at using any feature that requires new/delete but that is the same issue as using malloc/free in C. Also exceptions are off the table in my book)

    Meanwhile we are comparing to JavaScript here which already carries the "bloat" of needing an entire interpreter to run it! Small programs in C++ will of course be thousands of times smaller than the equivalent JS + interpreter. Not to mention a lot faster.

    I don't expect JS to be used on the Prop I or II, it's just going to be slow and requires a bolt on FLASH memory at least. But I can see that those ultra cheap and simple to use MCU's using JS might encroach on Parallax's educational territory.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-11-01 02:09
    Setting aside the debates of which language, and such..

    It just would be nice if all Parallax IDEs could be used on Apple products without a great deal of manipulation or advanced user skills.

    But it does seem that Apple wants the user to pay for the privledged and Parallax to pay for the opportunity.

    +++++++++++
    By the way, I don't think that Forth is 'all and everything' on the Propeller.. the diversity of languages is a good thing.

    I just think that Forth does bring a different approach and new insights to the user, and should have recognition for being capable of doing so.

    Basic tends to place the learning in a bubble where all they learn is Basic.

    C and C++ seems to send the user off into libraries to write bigger and bigger applications while expecting lower level support to be provided for the programmer.

    Assembler puts the learner very much in touch with the silicon and nuiances of the chip's design, but is often daunting to a beginner

    Forth seems offer another entry that provides immediate programming results while revealing more insights into the machine language and the assembler.

    =====
    In sum, different languages direct the learning into different directions, while some are very easy for the new user and others are not. Educators need all of them to produce graduates that are well-rounded in their programming abilities.
  • RaymanRayman Posts: 13,860
    edited 2013-11-01 03:15
    David Betz wrote: »
    What did you plug the FlashAir into? The only Propeller board that I have that has a full size SD card slot is my Dracblade.

    Yes, as I said before, you'd need to add a full size SD card socket... Parallax happens to sell one...

    BTW: Really, the FlashAir this is a Linux box. Some of these type of cards have been rooted... There is also a web developer kit for the FlashAir, in case you want to make a custom iPad app...
  • David BetzDavid Betz Posts: 14,511
    edited 2013-11-01 03:53
    Rayman wrote: »
    Yes, as I said before, you'd need to add a full size SD card socket... Parallax happens to sell one...

    BTW: Really, the FlashAir this is a Linux box. Some of these type of cards have been rooted... There is also a web developer kit for the FlashAir, in case you want to make a custom iPad app...
    I know you can hack into some of these Wi-Fi SD cards but would Parallax really want to build a product around hacking someone else's product? I think you need to use the components in ways that are supported by the people who make them.
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2013-11-01 04:02
    This discussion turned out to be so much fun. Lots to learn....
  • BeanBean Posts: 8,129
    edited 2013-11-01 04:36
    For the ipad to propeller connection, I would look at using a bi-directional "audio to IR" adapter (like the redeye mini).
    Then you have a wireless connection (no way to harm the ipad) and it's cheap.
    The only downside would be the speed, but I would assume that students are not writing large programs anyway.

    Combine that with an embedded language on the propeller and I think it would be a tidy solution.

    Bean
  • RaymanRayman Posts: 13,860
    edited 2013-11-01 06:35
    I wonder if there's a way to use the "Camera Connection Kit" for iPad for this... It would give you digital audio via the USB... I just read that it works with other USB devices too... Maybe there's some kind of USB trick that would work...
Sign In or Register to comment.