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

Programming Propellers from iPad

2456718

Comments

  • dgatelydgately Posts: 1,621
    edited 2013-10-29 10:27
    Ken Gracey wrote: »
    Is it possible to use the audio port for RS-232?

    Well, I think most solutions use FSK methods to communicate to external devices

    http://www.creativedistraction.com/demos/sensor-data-to-iphone-through-the-headphone-jack-using-arduino/

    One software/hardware solution for external sensors that work with iOS, Android, Windows Phone, etc. devices is Project HiJack : http://web.eecs.umich.edu/~prabal/projects/hijack/

    It uses FSK to communicate to and power external sensors from phones and tablets.

    Looks like SeeedStudio is selling the device that folks at UMich developed.

    So basically, I say "It can't be done!" in an effort to spark our intrepid forum folks to prove I'm wrong :thumb:


    dgately
  • Peter KG6LSEPeter KG6LSE Posts: 1,383
    edited 2013-10-29 10:28
    http://www.creativedistraction.com/demos/sensor-data-to-iphone-through-the-headphone-jack-using-arduino/

    https://www.sparkfun.com/products/10331
    I have used My SGS3 as a com term * not to program the running code * for my new T hunt box that I made with a PicAxe *I needed only a few I/0s and did not want to use such a large chip in the case

    Serial over Audio is a easy path ....... I dont know the audio sample rate the Ipad runs but if its 44.1K then I can totaly see 14.4 K baud as a upload option .......
  • Mike GreenMike Green Posts: 23,101
    edited 2013-10-29 10:42
    I have one of the SeeedStudio devices. The data rate is low ... about 8KBaud with a lot of fancy work (see the website for the DEV'10 paper). That's 1/2 minute for a large program.
  • Jeff MartinJeff Martin Posts: 751
    edited 2013-10-29 10:56
    Chrome Packaged Apps already support serial I/O:

    But it looks like the programming has to be done in JavaScript (which isn't so awful, actually).

    Although program files can be saved in the cloud or on an institution's own server, the UI has to run from a local server program on each machine. Otherwise the latency would be unbearable.

    -Phil

    Thanks Phil. I didn't know that Chrome Packaged Apps support serial I/O, but Native Client apps are not the same as Packaged Apps (which I think you know from what you said). The fact that Packaged Apps have access to serial I/O already makes me think it's truly on the horizon for Native Client apps as well.

    To everybody- Despite what I'd like to be the case, as far as the serial topic goes; ultimately, I think we need to focus on wireless connections regardless, because there's still the issue of drivers for the USB-to-Serial connection, not all these platforms (to my knowledge) have drivers that support that, and even if they do, it's another step to configure, complicate, and go wrong for users that struggle to get started. Ken's points are hovering around the fact that we need to make start-up easy for potential new users... with serial involved with today's devices, I think that's a losing battle in spite of my desire to keep the wired connection possible. In terms of implementation for us, things have gone from the simple (like RS-232 serial) to the complicated, while users are seeing things as going from the complicated to being simple for them (because of all the crazy back-end work manufacturers end up doing to support that).
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2013-10-29 11:00
    Audio I/O speed will be a factor of how much filtering is done in the analog circuitry. FSK is probably the slowest method. PSK and Manchester will be a lot faster if the audio hardware doesn't clobber the waveforms. All of these were used in the early days of home PCs to save data on tape cassettes. But PSK and Manchester required a better cassette recorder/player than the cheapest ones on the market.

    On the Prop side, I doubt that there would be a problem with any of these. (It already does FSK.) The fancy mod/demod techniques used by 56K modems would likley be a challenge, though, if not insurmountable.

    -Phil
  • __red____red__ Posts: 470
    edited 2013-10-29 11:14
    We need to continue to target Windows, Mac, and Linux, but we also getting tech calls begging for ChromeOS support

    I have a full propeller development platform running on my $225 ARM-based Samsung Chromebook. If you want the docs on how to build it I'll be happy to provide it.

    It runs in an ubuntu chroot()'d environment - not a ChromeOS application.
  • dgatelydgately Posts: 1,621
    edited 2013-10-29 13:18
    There is yet another method for communicating between a smart phone and an external device! (Just found this) The Shine fitness device is assumed to use capacitive touch, sitting on the screen of the phone/tablet. Looks interesting, though I'm not sure about throughput. Not sure if the phone actually communicates to the Shine device, but the Shine definitely transmits to the phone.

    http://www.fwthinking.com//blog/misfit-shine-works/


    An idea: For the propeller, the Parallax TSL1401 Linescan Imaging Daughterboard could read data from an onscreen line that represents data, but that adds another requirement to the develop propeller on iOS bundle.



    dgately
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-10-29 13:46
    Ken,

    Apple HATES the idea of a generic serial interface.

    http://lists.apple.com/archives/bluetooth-dev/2012/Nov/msg00065.html

    17kbps seems the max for BLE.

    It may be possible to get an app approved if it can only program the prop, but they won't allow any serial data/text back and forth (as other devices could then use it as a serial bridge)

    Without knowing the budget (per unit) of a "iPad programmer for Prop" the feasibility is difficult to ascertain.

    Bill
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-10-29 13:51
    I googled a bit, and found:

    http://www.get-console.com/shop/en/16-air-console

    It may be useful.
  • potatoheadpotatohead Posts: 10,254
    edited 2013-10-29 14:08
    Cool, but ouch! Kind of pricey.

    Hey, I'm just gonna toss this out there. What about something that just sticks to the screen, or clips on? For comms from iPad to device, pixels get lit under sensors. For comms from device back to iPad, the touch screen gets activated in a similar way.

    Run an app that provides the interface and a quickie "is it clipped on right?" test. Bits can be signalled in parallel...
  • max72max72 Posts: 1,155
    edited 2013-10-29 14:38
    for a wireless connection if I remember correctly bluetooth is not an ios options (while with android is works perfectly).
    Anyway supposing you have a working connection (bluetooth of wifi) and a terminal program running on the tablet you could develop on the prop with forth, dos, and spinix.
    This would work (almost) out of the box, even if you must accept some tradeoffs.
    Anyway you have 3 forth, 2 or 3 basic (what is the state of embedded basic) and a spin like with spinix.
  • max72max72 Posts: 1,155
    edited 2013-10-29 14:44
    just an add on.. spinix supported some c too, and in a past discussion it looked like it was possible to extend c support..
    http://forums.parallax.com/showthread.php/148959-Getting-started-with-Spinix/page2
  • Invent-O-DocInvent-O-Doc Posts: 768
    edited 2013-10-29 16:31
    I think a web browser ide will still solve the iPad part of the problem AND let kids with other tablets play too. This way, you get ease of use and simplicity for the kids. I do think they CAN use iPad to code on the browser, especially with a real keyboard. Just because it is suboptimal doesn't mean you cant.

    I personally switched from iPad to (gasp) surface 2 and am super happy with it. Though, alas, there's no prop ide on that platform...
  • Don MDon M Posts: 1,647
    edited 2013-10-29 16:39
    I think some sort of web / browser based IDE would be great. I'd gladly pay for some sort of dongle (bluetooth / WiFi to serial / USB) to program the Prop. I'd prefer not to have any sort of bloatware on the Propeller in order to be able to program it. I also do not want to be locked into using C to program with. I'd like to see it work similar to Spin Tool the way it is now.

    Just write / edit a program and be able to send it wirelessly to the dongle which in turn programs the Prop. That way it can be backward compatible to existing projects / products. Just my .02
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-10-29 16:41
    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
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-10-29 17:16
    Actually, the idea solution (IMHO):

    Ken, get everyone that wants it to bug Apple to enable SPP for Bluetooth. Get them to get their friends to email as well. Tell them the only reason that an affordable solution does not exist is Apple deliberately disallowing BT serial. If Apple gets enough complaints and support trouble tickets they may enable it.

    The only reason we have this problem is Apple refusing to allow generic serial access - why should customers suffer, and have to spend a lot more to work around it? Apple should fix it!

    Then - problem solved with a $5 ebay Bluetooth module, or even less with bulk raw BT chips.
  • Bill HenningBill Henning Posts: 6,445
    edited 2013-10-29 17:19
    Not without jailbreaking.
    Cluso99 wrote: »
    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
  • RaymanRayman Posts: 13,900
    edited 2013-10-29 17:23
    I thought I heard that Apple will let the new Bluetooth 4.0 operate at low speed for serial communications without anything special...
    But, I think only the newest models have that...

    Still, I think the FlashAir looks pretty good as a way to do this now... All you need is the FlashAir card and a full size SD socket adapter...
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-10-29 18:00
    Where is that Parallax ad with the dog on a flying bicycle when I need it??!

    Why on earth would Parallax want to adopt Apple's "closed" system to program Propellers? Android pads/systems are plentiful, hackable, and cheap.

    Jeff
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2013-10-29 18:00
    I can't help but chuckle because for the cost of some of these "adapters" that you need to get an iPad to do what you want you could instead have an Android tablet which will do all those things, even the cheap ones and even in that price range there are good ones to be had. Even here in Oz where all the tech stuff (including software purchased from the cloud) seems to be double the price, I picked up an 8" Android 4.1.2 tablet from ALDI for $169 and this has a SIM and microSD socket as well, can't fault it.

    So how about a "Android adapter"? :)
  • dgatelydgately Posts: 1,621
    edited 2013-10-29 18:53
    Where is that Parallax ad with the dog on a flying bicycle when I need it??!

    Why on earth would Parallax want to adopt Apple's "closed" system to program Propellers? Android pads/systems are plentiful, hackable, and cheap.

    Jeff

    Ken's initial posting as well as a follow-on details why the iPad is the base for this endeavor, though any method that works with the iPad should also work on Android. Educators and schools have made requests for Prop programming on iPads because that is what the students, educators and schools are using.

    Many iOS developers provide Android versions of their apps.


    dgately
  • Don MDon M Posts: 1,647
    edited 2013-10-29 19:00
    Ken, get everyone that wants it to bug Apple to enable SPP for Bluetooth. Get them to get their friends to email as well. Tell them the only reason that an affordable solution does not exist is Apple deliberately disallowing BT serial. If Apple gets enough complaints and support trouble tickets they may enable it.

    The only reason we have this problem is Apple refusing to allow generic serial access - why should customers suffer, and have to spend a lot more to work around it? Apple should fix it!

    Sorry Bill no offense intended but that would be a total waste of time. Apple could care less about such a small audience.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-10-29 19:26
    Just a bit more to tout my passion for Forth on the Propeller.... in this Ipad context

    A. Taiwan seems to have one of the remaining active Forth Interest Group, but they don't tend to be very English friendly so I haven't been able to participate.

    B. Forth has a huge educational potential for the Propeller as it is interactive and immediately shows students the errors they attempt, unlike a compiled program that forces the learner to bug hunt amongst pages of code listings. This alternate modality is very educationally helpful.

    C. Heaps of praise should go to PropForth and Tachyon Forth for pioneering in the concept of Forth on the Propeller.... but Dave Hein's pfth and its adherdance to the ANS Forth really makes it the optimal point of entry for new learners. There is a corpus of published material that supports ANS Forth, especially eForth's excellent explaination of the inner workings of a Forth machine in a microcontroller setting.

    D. Forth on the Propeller is faster than Spin, but obviously not as fast as PASM. Still it allows the user to acquire both Spin and PASM through a confirming alternative language. One bench mark of speed is that I can actually provide deterministically accurate delays in pfth down to 30 usecs, not 'somewhat linear delays' in the msec range.


    +++++++++++
    I realize that this may be an awkward sell with educators as they have the internal goals of their institutions to also deal with. Politically, they may just want C as it may be a core requirement and Forth may seem like a distraction. And yet, I suspect that one of the reasons that Taiwan sitll has a Forth Interest Group is that the industry is still turning to Forth to get initial developmental work done on mainstream development projects.

    (There may likely be a long tradition of a minority of closeted Forth users in industry that explore hardware in Forth, develop a working prototype in Forth, and then produce final code in Assembler and C to conform to management desires.)
  • jazzedjazzed Posts: 11,803
    edited 2013-10-29 19:55
    So Loopy,

    When do you expect Parallax to produce Forth course materials?
  • Cluso99Cluso99 Posts: 18,069
    edited 2013-10-29 20:26
    Ken said at the start, iPad is what is available.

    Can iPad write to these (micro) SD card adapters?
    http://dx.com/p/4-in-1-tf-sd-micro-usb-usb-to-apple-8pin-lightning-card-reader-adapter-for-ipad-4-ipad-mini-202726?tc=AUD&gclid=CN-GtovNvboCFSNfpgod-i8ASw

    Part of the attraction for schools is the iPad is "somewhat locked down" and that they are all the same. Imagine the problems with everyone with a different Android tablet! Cost is affordable because they are cheaper than the laptops the kids had yesterday.

    OT I cannot fault them for using iPads. I cannot wait to get my iPad Air or Mini Retna with LTE - haven't decided which yet. I have an Android (Motorola Xoom) and it's plagued with simple android type bugs. The last Android release for me was 4.0.1 and that looks like the last. I would rather a restricted tablet that is robust, supported for a reasonable length of time, and does almost everything I require without problems. I stayed away from Apple for a long time but my iPhone 5 convinced me to return to the fold.
  • Heater.Heater. Posts: 21,230
    edited 2013-10-30 00:18
    This is horrible.

    Parallax has put a lot of effort into cross-platform and open source Propeller tools in the passed few years.

    Now comes the demand to move to the "walled garden" of Apple. Away from one monopoly (or at least single source supplier) to another. Brilliant.

    How about:

    1) Supply each student's Propeller target system with an ARM based "dongle" running Linux and having WIFI connectivity.

    2) The student does his programming in the browser on his iPad/Android/Chomebook/PC, whatever. There are WEB based editors and complete IDE's available for this. "Cloud 9" and ACE for example.
    https://c9.io/
    http://ace.c9.io/#nav=about

    These can be hosted on the ARM "dongle" itself or elsewhere.

    3) Programs are beamed over to the ARM dongle, compiled there and loaded to the Prop using normal serial/USBserial connection. All the open source Propeller tools, propgcc, loader etc work just fine on ARM already.

    4) With something like tty.js https://github.com/chjj/tty.js/ we can get a terminal connection to the Propeller via a server on the "ARM" dongle and web sockets.

    Bottom line is, the Browser is the IDE thus bypassing all the issues of whatever platform students have this week.

    Of course this is a great way to sell a lot of other peoples products (whatever "dongles" are required)

    The "dongle" in my case would be a Raspberry Pi. Cheap and readily available. And with the great advantage that it carries the possibility of exposing students to programming on the Pi and the eventual realization that there can be a world outside their iPAD gardens:)
  • BeanBean Posts: 8,129
    edited 2013-10-30 04:26
    max72 wrote: »
    Anyway you have 3 forth, 2 or 3 basic (what is the state of embedded basic) and a spin like with spinix.

    Propeller Embedded BASIC (PE-BASIC) is here http://forums.parallax.com/showthread.php/123678-PE-Basic-Version-0.16-July-11-2011

    It already has a telnet interface.

    I think an embedded language is the way to go. Even Chip has talked about wanting an embedded way to program the Propeller (and Propeller 2).

    As much as I dislike C, that is probably want educators will want. So some type of embedded C language would probably be the best.

    Without using an embedded language, I would think that Bluetooth audio would be way to interface an ipad to a Propeller.

    Bean
  • dMajodMajo Posts: 855
    edited 2013-10-30 08:03
    Why just not use a terminal server? I am not a linux guy but as many windows server os has terminal services I am pretty shure that also linux offer this capabilities natively.

    both android smartphones and tablets have rdp/vnc apps (and as I am aware they exists also for iOS systems) that can make available the already existing development tools for windows and linux. One terminal server in the class or in the school can solve the problem. Al the students can use iPads as terminals and benefit from centrally installed and maintained SimpleIDE (or whatever) software and central repository for the sources (shared between users or not).

    To program the propellers perhaps something like this http://www.moxa.com/product/NPort_S8455_S8458.htm can be used in the laboratory/classroom. We use these devices in harsh industrial environment since many years without a problem. The same serial port can also be transparently shared between many PC at the same time. Each serial port is independently configurable and addressable to any PC. Drivers available for all win releases included CE, many linux distro, QNX ...
  • jazzedjazzed Posts: 11,803
    edited 2013-10-30 09:09
    Bean wrote: »
    As much as I dislike C, that is probably want educators will want. So some type of embedded C language would probably be the best.
    I've played with an embedded and interpreted subset of C on Propeller. It works, but it is slow and program code can only be about 4K which isn't to bad considering the constraints.

    Some may argue that a subset of C is not C. I agree, but even a simple subset can help to understand the language and syntax.

    Simple tends to be a requirement for Parallax. Simple is fine for introductory programming.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2013-10-30 09:10
    jazzed wrote: »
    So Loopy,

    When do you expect Parallax to produce Forth course materials?

    Parallax may never produce Forth course material. Simply put, it doesn't have to.

    There is a very adequate amount of Forth material available on the internet for free (at least in English). If an eduator already has an inclination to teach Forth in the classroom, that material can present Forth in general. ... especially ANS Forth. There may be Chinese language Forth materials available via the Taiwan F.I.G.

    What the educator has to do is lecture and present the adaptation of Forth to an 8 cog environment. This is not a big streach.
    Daviid Hine's Readme.txt, which is included in every version has improved greatly (starting with version 0.83) and is adequate to get multiple cogs running and control all the i/o pins. If there is a need for something specific (like activation of the two counters on each cog), new Forths words with PASM instructions take only a moment to write.

    +++++++++++++++++++++++++++++
    My own feeling is that if these computer students all have a $500 USD IPad for their computer studies, they can easily afford to pay a fee for a Parallax IDE for the Ipad. I am not very sympathetic with this rather well-off minority, and am having a hard time believing that educational institutions are really running computer programing classes that insist on each and every student having an Ipad as their first choice study platform.

    IOW, one can learn far more with an old junker and Debian Linux installed for free --- Parallax has worked hard to provide for that demographic. China is somewhat Apple-phobic and also wary of MS. Meanwhile unemployment amongst EU youth is rather high. So I wonder who is actually making these rather compelling requests for IPad support. Android with OpenAVR seems like a more appropriate educational resource.
Sign In or Register to comment.