Skip to content

Arduino

Andy Arvanitis edited this page Jul 26, 2019 · 8 revisions

WIP

Note: For the C++11 target only

Example Makefile

Example blink.purs

Example blink_ffi.cpp

Prerequisites

  • Familiarity with Arduino and its IDE (and installed)
  • Familiarity with native command line tools, especially GNU Make
  • Boost libraries installed (using your system's package manager is easiest)
  • This fork of ArduinoSTL cloned somewhere
  • Some of these files copied and others removed:
       $ cp -R $(ARDUINO_IDE_BASE)/Java/hardware/arduino/avr/cores/arduino $(FFI_SRC)/
       $ rm $(FFI_SRC)/arduino/hooks.cpp
       $ rm $(FFI_SRC)/arduino/main.cpp

Notes/warnings

  • The sample "blink" program above was only tested on a recent Arduino Uno
  • Most Arduino devices have very little flash and RAM (the Uno has 2 KB RAM), so it's probably very easy to write a program which can exceed either
  • This setup was tested on macOS Mojave
  • Using this is probably not for beginners – it's more complicated than using the Arduino IDE
Clone this wiki locally