There is also a feature of Arduino Create that allows you to program SBCs like the RPi:
Unfortunately the official support for those boards is not also available in the Arduino IDE, only the Arduino Web Editor. So if you're set on using the Arduino IDE, you'll need to use a 3rd party hardware package like the one at the first link.
There is also a feature of Arduino Create that allows you to program SBCs like the RPi: You can now use Arduino to program Linux IoT devices | Arduino Blog
Unfortunately the official support for those boards is not also available in the Arduino IDE, only the Arduino Web Editor. So if you're set on using the Arduino IDE, you'll need to use a 3rd party hardware package like the one at the first link.
Thank you. I see I was not crazy enough! Others had that idea before me.
I had the Arduino IDE on the raspi itself in mind, but crosscompiling is also OK.
Maybe it will work with localhost as target address?
Let's test that the next weeks.
I've never used either option so I can't provide any further information. Maybe someone else here on the forum has experience with this sort of thing and will chime in.
pert:
I've never used either option so I can't provide any further information. Maybe someone else here on the forum has experience with this sort of thing and will chime in.
I tried the first option, which seem to work on networked Raspi.
I miss however a better documentation on which features/libraries are supported and which aren't.
Unsurprisingly interrupts don't work and with them many libraries based on them.
I get some strange errors on library NRF24:
/RF24_config.h:112:0: warning: "_BV" redefined
That's a warning, not an error. A warning is the compiler telling you "this code is suspicious, you might want to take a look at it. Sometimes warnings indicate a serious problem, other times you can safely ignore them. An error is something that causes compilation to fail. That code will produce the same warning compiled for Uno. The warning should also show you the previous definition:
c:\users\per\appdata\local\arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino4\avr\include\avr\sfr_defs.h:208:0: note: this is the location of the previous definition
#define _BV(bit) (1 << (bit))
The two macros do the exact same thing so this is not a problem.
I'm not sure exactly what the purpose of this code was. Perhaps on some toolchains that macro is not defined. If so, they should have written it like this:
#ifndef _BV
#define _BV(x) (1<<(x))
#endif
Then it would not produce a warning when there was a previous definition of that macro.