Tech Beastz

Blinking an Arduino LED in Julia

Blinking an Arduino LED in Julia


The Julia programming language is a terrific fit for no-frills microcontrollers like the ATMega328p which is housed within the classic Arduino, but it didn't stop [Sukera] by trying, and by succeeding,


All the features that make Julia A good programming language for your big computer makes it a terrific alternative to Arduino. It is designed for interactivity, is dynamically typed, and relies heavily on its garbage collection; Each of these features alone will make the Mega at breaking point. But on its side, it is a compiled language that is based on LLVM, and LLVM has an AVR backend for C. Should be a simple matter of weeding out some overhead, recompiling LLVM to add the AVR target for Julia, and then fixing all the other loose ends, right?


Well, it turns out it almost was. leaning heavily on the flexibility of LLVM, [Sukera] Manages to turn off all language features that aren't needed, and manages to make an LED blink slowly, after some minor hindrances like the usual problems with volatile and atomic variables. Huzzah. we love [Sukera’s] wry "Now I spend two days at it well!" After all that's done, but seriously, this is the first time we've even seen super-rudimentary Julia code running on every 8-bit microcontroller, so there's definitely some kudos here.


By the time Julia is incorporated into the AVR, what makes it attractive on larger computers is missing on the micro, so we don't really see people picking it up directly on C, which has a much more developed ecosystem. Is. But still, it's great to see what it takes to get a runtime and a language around garbage collection up and running on our favorite mini micro.


Thank you [Joel] for the tip!



Post a Comment

0 Comments