Prototype v002 Code
Posted by Taylor Bernard on June 5, 2013
took out what i thought we didnt need from the old code, not throwing any errors so far.
can you take out where it prints 'blink' like every 100ms or so, i want to slim it down so we can print the date and elapsed time to EEPROM next.
heres file
can you take out where it prints 'blink' like every 100ms or so, i want to slim it down so we can print the date and elapsed time to EEPROM next.
heres file
Comments
Justin Bernard on June 5, 2013:
Taylor Bernard on June 5, 2013:
Justin Bernard on June 5, 2013:
all i did was comment out
// digitalWrite( ledPin, _value ); (line 194)
and
// digitalWrite( ledPin, LOW ); (line 198)
thats where it's actually blinking.
Taylor Bernard on June 6, 2013:
i want it to blink, just dont want it to print it in the com.
Justin Bernard on June 6, 2013:
if so, comment this out
// Serial.print( "*** LED BLINK ***" ); (line 184)
Taylor Bernard on June 6, 2013:
Lets see if we can write something to the EEPROM.
most of the code out there has write limitations to it, and you had to do a work-around on getting larger byte strings.
found this, supposedly can read/write long strings. see if this makes any sense. looks like a lot of ++> if (0) ; and math but just look at the communication side.
http://playground.arduino.cc/Main/LibraryForI2CEEPROM
Justin Bernard on June 6, 2013:
Taylor Bernard on June 6, 2013:
sketch_jun06a.ino: In function 'void setup()':
sketch_jun06a:47: error: 'I2C_EEPROM_VERSION' was not declared in this scope
sketch_jun06a.ino: In function 'void dumpEEPROM(unsigned int, unsigned int)':
sketch_jun06a:168: error: 'ee' was not declared in this scope
sketch_jun06a.ino: In function 'void logData()':
sketch_jun06a:224: error: 'ee' was not declared in this scope
Taylor Bernard on June 6, 2013:
Serial.print( " --- " );
Serial.print(now.hour(), DEC);
Serial.print(':');
Serial.print(now.minute(), DEC);
Serial.print(':');
Serial.print(now.second(), DEC);
Justin Bernard on June 6, 2013:
Justin Bernard on June 6, 2013:
Taylor Bernard on June 6, 2013:
Taylor Bernard on June 6, 2013:
"this is easy, its a unix based system" - 12yr old girl
Justin Bernard on June 6, 2013:
Taylor Bernard on June 6, 2013:
Justin Bernard on June 6, 2013:
Taylor Bernard on June 7, 2013:
in the sketch, about 5th line WAS:
I2C_eeprom ee(0x50);
was throwing error so made it:
#define I2C_eeprom ee(0x50);
now its saying later in the loop at:
ee.setBlock.....
sketch_jun07a.ino: In function 'void loop()':
sketch_jun07a:22: error: 'ee' was not declared in this scope
sketch_jun07a.ino: In function 'void dumpEEPROM(unsigned int, unsigned int)':
sketch_jun07a:68: error: 'ee' was not declared in this scope
only place i can find 'ee' is right at the top in the #defines, looks like they are trying to make 'ee' defined for the name and location of device ( i2C_eeprom @ 0x50 address ) so they can use it shorthand for ee later in code. somehow its not formatted right
heres cpp and h files as well.
Taylor Bernard on June 12, 2013:
http://playground.arduino.cc//Main/LibraryForI2CEEPROM
this same part of code is throwing error though.....
/*
* Example: I2C bus - EEPROM 24LC256
*/
#include <Wire.h> //I2C library
#include <I2C_eeprom.h>
I2C_eeprom ee(0x50);
that last line defines the address of the device (0x50). but there is no #define in front of it.
throws an error:
"sketch_jun11a:8: error: 'I2C_eeprom' does not name a type"
when i put #define in front of it, like some other guys code when they are naming device, it skips error on that section but throws one a few lines down in the (loop):
"sketch_jun11a:22: error: 'ee' was not declared in this scope"
on the 'ee.setBlock' line
in:
void loop()
{
Serial.println("\nTEST: 64 byte page boundary writeBlock");
ee.setBlock(0,'0',100);
dumpEEPROM(0, 80);
-----
up in the #define I2C in the header, it has the ee label up there. thats only place i can find that 'ee' tag, even in the .cpp and .h files. so its gotta be formatted incorrectly. maybe a space after 'ee' and before device address? something is up with that.
Taylor Bernard on June 12, 2013:
http://apexlogic.net/code-bank/arduino/eeprom-i2c-write-anything/
look like he's defining 'ee' in the .H file:
in the other guys .H file and sketch theres no ee reference.
Taylor Bernard on June 12, 2013:
cause theres onboard eeprom that doesnt save data when power is turned off. its super easy to write to. the i2c that we have is external, and saves data when power is off, its a lot trickier code and done a completely different way.