Forget about the fancy IDE approach. To me it was a dead end because of dependencies. And we all love Geany, vim and the terminal anyway, don't we..)
The tool we need is platformio core
SOURCE: http://platformio.org/get-started/cli
First you need to load your devx. On Fatdog64 you can load it with
Code: Select all
load_sfs.sh --load <path>/*devx*.sfs
Then we need pip ( https://en.wikipedia.org/wiki/Pip_%28package_manager%29 )
Code: Select all
wget -qO- https://bootstrap.pypa.io/get-pip.py | python
Code: Select all
pip install setuptools
Code: Select all
pip install -U platformio
Code: Select all
cd /etc/udev/rules.d/
wget https://github.com/platformio/platformio-core/blob/develop/scripts/99-platformio-udev.rules
Code: Select all
command -v platformio
Get a list of supported boards
Code: Select all
platformio boards
Code: Select all
platformio device list
Code: Select all
/dev/ttyUSB0
------------
Hardware ID: USB VID:PID=1A86:7523 LOCATION=1-8.4
Description: USB2.0-Serial
Code: Select all
mkdir /tmp/test_project
cd /tmp/test_project
platformio init --board uno
Code: Select all
geany src/main.c
Code: Select all
/**
* Blink
*
* Turns the L LED on and off
*/
#include "Arduino.h"
#ifndef LED_BUILTIN
#define LED_BUILTIN 13
#endif
void setup()
{
// initialize LED digital pin as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
// turn the LED on (HIGH is the voltage level)
digitalWrite(LED_BUILTIN, HIGH);
// wait for a second
delay(1000);
// turn the LED off by making the voltage LOW
digitalWrite(LED_BUILTIN, LOW);
// wait for a second
delay(3000);
}
Code: Select all
platformio run
Code: Select all
platformio run -t upload
I think that is basically it.. As I use to do I wrapt it up in an sfs and that one came in at 6.5M. That is quite a lot less than the IDE alternatives out there.
As arduino is unfamiliar terrain to me I found the following resources handy:
https://learn.adafruit.com/ladyadas-lea ... n-number-0
http://docs.platformio.org/en/latest/wh ... ormio.html
Happy coding
Uten