diff --git a/examples/basic_test/basic_test.ino b/examples/basic_test/basic_test.ino new file mode 100644 index 0000000..afaf596 --- /dev/null +++ b/examples/basic_test/basic_test.ino @@ -0,0 +1,26 @@ + +#include + +//Use the xxx_e types rather than the standard types like uint8_t +struct Foo{ + uint8_p a; + int16_p b; + float_p c; +}; + +const Foo foo PROGMEM = { //PROGMEM tells the compiler that the object resides in flash memory. + 45, + 12345, + 3.1415f +}; + +void setup(){ + + //Print values directly from PROGMEM + Serial.begin(9600); + Serial.println(foo.a); + Serial.println(foo.b); + Serial.println(foo.c); +} + +void loop() {}