Posts with «programming language» label

The Mouse Language, Running on Arduino

Although plenty of us have our preferred language for coding, whether it’s C for its hardware access, Python for its usability, or Fortran for its mathematic prowess, not every language is specifically built for problem solving of a particular nature. Some are built as thought experiments or challenges, like Whitespace or Chicken but aren’t used for serious programming. There are a few languages that fit in the gray area between these regions, and one example of this is the language MOUSE which can now be run on an Arduino.

Although MOUSE was originally meant to be a minimalist language for computers of the late 70s and early 80s with limited memory (even for the era), its syntax looks more like a more modern esoteric language, and indeed it arguably would take a Python developer a bit of time to get used to it in a similar way. It’s stack-based, for a start, and also uses Reverse Polish notation for performing operations. The major difference though is that programs process single letters at a time, with each letter corresponding to a specific instruction. There have been some changes in the computing world since the 80s, though, so [Ivan]’s version of MOUSE includes a few changes that make it slightly different than the original language, but in the end he fits an interpreter, a line editor, graphics primitives, and peripheral drivers into just 2KB of SRAM and 32KB Flash so it can run on an ATmega328P.

There are some other features here as well, including support for PS/2 devices, video output, and the ability to save programs to the internal EEPROM. It’s an impressive setup for a language that doesn’t get much attention at all, but certainly one that threads the needle between usefulness and interesting in its own right. Of course if a language where “Hello world” is human-readable is not esoteric enough, there are others that may offer more of a challenge.

Learn Functional Reactive Programming on Your Arduino

Everyone loves learning a new programming language, right? Well, even if you don’t like it, you should do it anyway, because thinking about problems from different perspectives is great for the imagination.

Juniper is a functional reactive programming language for the Arduino platform. What that means is that you’ll be writing your code using anonymous functions, map/fold operations, recursion, and signals. It’s like taking the event-driven style that you should be programming in one step further; you write a=b+3 and when b changes, the compiler takes care of changing a automatically for you. (That’s the “reactive” part.)

If you’re used to the first-do-this-then-do-that style of Arduino (and most C/C++) programming, this is going to be mind expanding. But we do notice that a lot of microcontroller code looks for changes in the environment, and then acts (more or less asynchronously) on that data. At that level of abstraction, something like Juniper looks like a good fit.

Changing up the programming paradigm for Arduino is an ambitious project, especially considering that it was started by two undergraduates [Caleb Helbling] and [Louis Ades] as a senior design project. It’s also brand new, so there’s not much of a codebase out there yet. Time, and your participation, will tell if it’s useful. But one thing’s for sure, once you’ve programmed in a reactive language, you’re not going to be able to look at a delay loop the same again.

What’s the wierdest language you’ve ever programmed a microcontroller in?

(The XKCD comic’s alt-text reads “Functional programming combines the flexibility and power of abstract mathematics with the intuitive clarity of abstract mathematics”.)


Filed under: Arduino Hacks

Insert Coin: Modkit Micro asks us if we're ready for six-year-olds coding Arduino boards

In Insert Coin, we look at an exciting new tech project that requires funding before it can hit production. If you'd like to pitch a project, please send us a tip with "Insert Coin" as the subject line.

What does microcontroller programming have in common with Tetris? Quite a bit if you're doing it with Modkit Micro from a Kickstarter project out of Cambridge, MA., which allows almost anyone to visually set up their hardware using graphical blocks to write the code. The partially-hooded trio behind it promises that the software is ideal for use with protyping boards from Arduino, Evil Mad Science, Lilypad, Seeed Studio, Wiring and SparkFun, and they even claim that elementary school students have used it to "take their projects from concept to reality in just a few hours." Purists should have no fear either: you can still get into a code view to see what's going on behind the scenes. A web-based Modkit Micro is being offered online starting June 1st for $25, and there'll be a desktop variant for Windows, OSX, and Linux as early as July if they reach their funding target. Check out the video after the break and then try to get your kids to wait for college before inventing version 2.0 of this.

Continue reading Insert Coin: Modkit Micro asks us if we're ready for six-year-olds coding Arduino boards

Insert Coin: Modkit Micro asks us if we're ready for six-year-olds coding Arduino boards originally appeared on Engadget on Tue, 29 May 2012 10:01:00 EST. Please see our terms for use of feeds.

Permalink | Email this | Comments