Skip to content

Commit

Permalink
Added basic_test example.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris--A committed Oct 30, 2015
1 parent 70c5207 commit 947baab
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions examples/basic_test/basic_test.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

#include <PGMWrap.h>

//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() {}

0 comments on commit 947baab

Please sign in to comment.