From 3d554c11df1106dbdd5b91875d071b4446c49851 Mon Sep 17 00:00:00 2001 From: Mike Szczys Date: Sat, 28 Dec 2013 17:01:38 -0600 Subject: [PATCH] Added: Arduino sketch aimed at writing uniques to tags --- unique_write/unique_write.ino | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 unique_write/unique_write.ino diff --git a/unique_write/unique_write.ino b/unique_write/unique_write.ino new file mode 100644 index 0000000..ce5030f --- /dev/null +++ b/unique_write/unique_write.ino @@ -0,0 +1,23 @@ +#include +#include "/home/mike/compile/nfc-voting/unique-string-gen/uniqueSet.h" +// the setup routine runs once when you press reset: +void setup() { + // initialize serial communication at 9600 bits per second: + Serial.begin(9600); +} + +unsigned int uniqInt; +unsigned int counter = 0; +// the loop routine runs over and over again forever: +void loop() { + + Serial.println("Hello World!"); + delay(1000); // delay in between reads for stability + + uniqInt = pgm_read_word_near(uniqueSet + counter); + Serial.println(uniqInt); + Serial.println("hackaday.com/LA2014?" + String(uniqInt, HEX)); + + if (++counter >= uniqueSetLen) { counter = 0; } + +}