
I've been working with open source rc aircraft transmitter software,
and in looking at the shortcomings of one of them, started thinking
about embedding a language. There are a number of options that can
work here, like FORTH or a basic. But then I realized that Haskell -
or similar functional language - could well be a good fit.
The software is meant to let the end user express how the various
inputs - joysticks, switches, trims, knobs - are mapped to values the
radio sends on the various control channels. All the key values are
immutable - you either read them from hardware once in the process of
building a frame to transmit, or you fill them into a frame and
transmit it, then start over for the next frame. You just need to let
the end user express the functions to go from one to the other.
The other restraint is that you need to be able to change the code in
the field, with the only computer available being the embedded one.
You might have a touch-screen, or you might just have cursor keys.
Either way, actually inputting a program could be interesting.
Similarly, the entire system: compiler, interpreter, whatever - needs
to run on the embedded computer.
A quick google turns up Hume, which seems to be designed for this kind
of thing, though not with the "in the field" restrictions.
Anyone have any other suggestions of software that might fit here?
Experience with any of that software? Other suggestions?
Thanks,

Another option would be to use Atom. I have successfully used it to
target the arduino platform before. Running the entire OS on the
embedded system seems dubious. Assuming you are using something the 9x
family of transmitters -- they are slow and have very little internal
memory. Plus trying to programming using a 6 buttons would be a royal
pain. If you really want in-field programming, then you might at least
using a raspberry pi with a small bluetooth keyboard and have it
upload to the transmitter.
- jeremy
On Wed, Feb 20, 2013 at 1:33 PM, Mike Meyer
I've been working with open source rc aircraft transmitter software, and in looking at the shortcomings of one of them, started thinking about embedding a language. There are a number of options that can work here, like FORTH or a basic. But then I realized that Haskell - or similar functional language - could well be a good fit.
The software is meant to let the end user express how the various inputs - joysticks, switches, trims, knobs - are mapped to values the radio sends on the various control channels. All the key values are immutable - you either read them from hardware once in the process of building a frame to transmit, or you fill them into a frame and transmit it, then start over for the next frame. You just need to let the end user express the functions to go from one to the other.
The other restraint is that you need to be able to change the code in the field, with the only computer available being the embedded one. You might have a touch-screen, or you might just have cursor keys. Either way, actually inputting a program could be interesting. Similarly, the entire system: compiler, interpreter, whatever - needs to run on the embedded computer.
A quick google turns up Hume, which seems to be designed for this kind of thing, though not with the "in the field" restrictions.
Anyone have any other suggestions of software that might fit here? Experience with any of that software? Other suggestions?
Thanks,
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Wed, Feb 20, 2013 at 4:01 PM, Jeremy Shaw
Another option would be to use Atom. I have successfully used it to target the arduino platform before. Running the entire OS on the embedded system seems dubious. Assuming you are using something the 9x family of transmitters -- they are slow and have very little internal memory. Plus trying to programming using a 6 buttons would be a royal pain. If you really want in-field programming, then you might at least using a raspberry pi with a small bluetooth keyboard and have it upload to the transmitter.
Atom does look interesting. Thanks for the pointer. The target transmitter is the Walkera Devo line. These have much more capable CPUs than the various 9x boards: 32 bit ARMs at 72MHz with comparable amounts of storage. Some have 9x-like screen/button combos, others have touch screens. The deviationTx software runs on all of them. Settings are stored in a FAT file system that can be accessed as a USB drive. I'm thinking that a traditional configuration interface on the transmitter, storing the config information as program text. The only actual programming would be done by replacing the virtual channel/switch feature with expressions or short programs.

Ah, nice. Building Haskell applications on the Raspberry Pi which is a
32-bit 700 Mhz CPU with 512MB of RAM is still pretty painful. So, I
think that running GHC on something even less powerful is probably not
going to work well. But, handling a subset of Haskell for onsite
programming could work. Using Haskell Source Extensions and the new
Haskell Type Extensions should be enough to allow you to create an
onboard mini-Haskell interpreter? It would actually be pretty neat to
be able to extend all sorts of Haskell applications with a
Haskell-subset scripting language..
I'd definitely be interested in exploring this more. I recently got
into multirotors and I am also working on a semi-autonomous rover
project -- plus I just want to see Haskell used more in educational
robotics (http://www.haskell.org/haskellwiki/RoboticOverlords).
- jeremy
On Wed, Feb 20, 2013 at 4:28 PM, Mike Meyer
On Wed, Feb 20, 2013 at 4:01 PM, Jeremy Shaw
wrote: Another option would be to use Atom. I have successfully used it to target the arduino platform before. Running the entire OS on the embedded system seems dubious. Assuming you are using something the 9x family of transmitters -- they are slow and have very little internal memory. Plus trying to programming using a 6 buttons would be a royal pain. If you really want in-field programming, then you might at least using a raspberry pi with a small bluetooth keyboard and have it upload to the transmitter.
Atom does look interesting. Thanks for the pointer.
The target transmitter is the Walkera Devo line. These have much more capable CPUs than the various 9x boards: 32 bit ARMs at 72MHz with comparable amounts of storage. Some have 9x-like screen/button combos, others have touch screens. The deviationTx software runs on all of them.
Settings are stored in a FAT file system that can be accessed as a USB drive. I'm thinking that a traditional configuration interface on the transmitter, storing the config information as program text. The only actual programming would be done by replacing the virtual channel/switch feature with expressions or short programs.

in addition to atom http://hackage.haskell.org/package/atom/
theres also copilot http://hackage.haskell.org/package/copilot
point being: theres lots of great tools you can use to target embedded
systems that leverage haskell in cool ways!
(eg: hArduino on the more hobbyist side, which I need to check out myself! )
enjoy your explorations!
-Carter
On Wed, Feb 20, 2013 at 10:51 PM, Jeremy Shaw
Ah, nice. Building Haskell applications on the Raspberry Pi which is a 32-bit 700 Mhz CPU with 512MB of RAM is still pretty painful. So, I think that running GHC on something even less powerful is probably not going to work well. But, handling a subset of Haskell for onsite programming could work. Using Haskell Source Extensions and the new Haskell Type Extensions should be enough to allow you to create an onboard mini-Haskell interpreter? It would actually be pretty neat to be able to extend all sorts of Haskell applications with a Haskell-subset scripting language..
I'd definitely be interested in exploring this more. I recently got into multirotors and I am also working on a semi-autonomous rover project -- plus I just want to see Haskell used more in educational robotics (http://www.haskell.org/haskellwiki/RoboticOverlords).
- jeremy
On Wed, Feb 20, 2013 at 4:28 PM, Mike Meyer
wrote: On Wed, Feb 20, 2013 at 4:01 PM, Jeremy Shaw
wrote: Another option would be to use Atom. I have successfully used it to target the arduino platform before. Running the entire OS on the embedded system seems dubious. Assuming you are using something the 9x family of transmitters -- they are slow and have very little internal memory. Plus trying to programming using a 6 buttons would be a royal pain. If you really want in-field programming, then you might at least using a raspberry pi with a small bluetooth keyboard and have it upload to the transmitter.
Atom does look interesting. Thanks for the pointer.
The target transmitter is the Walkera Devo line. These have much more capable CPUs than the various 9x boards: 32 bit ARMs at 72MHz with comparable amounts of storage. Some have 9x-like screen/button combos, others have touch screens. The deviationTx software runs on all of them.
Settings are stored in a FAT file system that can be accessed as a USB drive. I'm thinking that a traditional configuration interface on the transmitter, storing the config information as program text. The only actual programming would be done by replacing the virtual channel/switch feature with expressions or short programs.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (3)
-
Carter Schonwald
-
Jeremy Shaw
-
Mike Meyer