Timeline for Can you access the EEPROM of an ATtiny with Arduino Code?
Current License: CC BY-SA 3.0
24 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jul 22, 2020 at 2:37 | answer | added | mckenzm | timeline score: 0 | |
| Oct 16, 2018 at 3:00 | history | tweeted | twitter.com/StackArduino/status/1052031501943152640 | ||
| Oct 16, 2018 at 1:36 | answer | added | tech-head-uk | timeline score: 0 | |
| Jun 22, 2016 at 9:37 | comment | added | Nick Gammon♦ |
Here is the second sketch I'm using to test the EEPROM: - no it isn't because that doesn't compile: sketch_jun22a:16: error: 'CLK' was not declared in this scope
|
|
| Jun 10, 2016 at 18:28 | vote | accept | Isabel Alphonse | ||
| Jun 10, 2016 at 15:30 | comment | added | Isabel Alphonse |
Problem is that if I set the value of CLK inside the function method I can't access it in any of the other functions.
|
|
| Jun 10, 2016 at 15:19 | comment | added | RSM |
Move the definition of byte CLK = 0; outside void setup and then do this in void setup: ` CLK = EEPROM.read(0);`
|
|
| Jun 10, 2016 at 15:06 | comment | added | RSM | okay. I am editing my answer with a bit more stuff please have a look at it. | |
| Jun 10, 2016 at 15:04 | comment | added | Isabel Alphonse | Sorry, I tried to improve it based on your feedback. However, I understand what you're trying to say so thank you I think I can figure it out from here. | |
| Jun 10, 2016 at 14:54 | comment | added | RSM | please would you stop changing the code in the question. | |
| Jun 10, 2016 at 14:51 | answer | added | RSM | timeline score: 10 | |
| Jun 10, 2016 at 14:49 | history | edited | Isabel Alphonse | CC BY-SA 3.0 |
added 119 characters in body
|
| Jun 10, 2016 at 14:43 | answer | added | Dampmaskin | timeline score: 1 | |
| Jun 10, 2016 at 14:22 | history | edited | Isabel Alphonse | CC BY-SA 3.0 |
deleted 94 characters in body
|
| Jun 10, 2016 at 14:21 | comment | added | Isabel Alphonse | Thank you, that's some great information. Follow up question: If I write on sketch with the write commands can I then access those values using another sketch? In other words can I split my program up the way I just did in my question? | |
| Jun 10, 2016 at 14:18 | comment | added | RSM |
the ATTiny can be used with the EEPROM library from the arduino ide it is basically a wrapper of the avr/eeprom.h. What also might kill your first cell in EEPROM is repeatedly reading it in the loop. That kills EEPROM cells, they have limited read write cycles. Also why do you have exit(0)
|
|
| Jun 10, 2016 at 14:03 | history | edited | Isabel Alphonse | CC BY-SA 3.0 |
added 781 characters in body
|
| Jun 10, 2016 at 14:00 | comment | added | Isabel Alphonse |
I didn't write the other EEPROM question. I saw that it was unanswered and decided to ask my own. Also, my question is about the ability of the ATtiny EEPROM to be programmed with Arduino. Like I said, my code was working fine until I switched the value with EEPROM.read(0) which caused the code to just stop working.
|
|
| Jun 10, 2016 at 13:59 | review | Close votes | |||
| Jun 26, 2016 at 3:03 | |||||
| Jun 10, 2016 at 13:57 | comment | added | RSM | an ATTiny has 512 bytes of EEPROM and you also asked a similar question earlier. You need to add what you have tried to retrieve those values and how you know they have been retrieved properly. The eeprom values have been written to properly in the above 'snippet'. And that's the problem you have not given all your code. | |
| Jun 10, 2016 at 13:48 | history | edited | Isabel Alphonse | CC BY-SA 3.0 |
added 3 characters in body
|
| Jun 10, 2016 at 13:48 | comment | added | Isabel Alphonse | What is wrong with my question? | |
| Jun 10, 2016 at 13:39 | comment | added | RSM | I wish I had the ATTiny you have with 512MB of EEPROM, it must be a new one. Please have a look at this arduino.stackexchange.com/help/how-to-ask | |
| Jun 10, 2016 at 13:18 | history | asked | Isabel Alphonse | CC BY-SA 3.0 |