Closed vanbwodonk closed 11 months ago
Hi, I just compiled the example countPowerCycles against the arduino-pico on Arduino IDE without errors and with minimal changes to the EEWL library. I have no RP2040 boards, so I must stop here for now.
Thanks @fabriziop, i can help you to test, with my raspberry pi pico.
Ok, if you want to test, you need to edit file .../EEWL/src/eewl.h:
add || defined(__arm__)
at the end of the line marked with double asterisks as follows.
Remember to compile with Arduino-pico.
` / macros /
#define EE_WRITE( addr , val ) (buffer[(int)( addr )] = val)
#define EE_READ( addr ) (buffer[(int)( addr )])
#ifdef __AVR__
#define EE_WRITE( addr , val ) (EEPROM[ (int)( addr ) ].update( val ))
**#elif defined(ESP8266) || defined(ESP32) || defined(arm)
#else
#error ERROR: unsupported architecture
#endif
#ifdef ESP32
#define EE_READ( addr ) (EEPROM.read((int)( addr )))
#else
#define EE_READ( addr ) (EEPROM[ (int)( addr ) ])
#endif
#include <EEPROM.h>
`
try edit and compile with arduino-pico core, got this error
In file included from /home/drw/Arduino/libraries/EEWL/examples/countPowerCycles/countPowerCycles.ino:24:
/home/drw/Arduino/libraries/EEWL/src/eewl.h: In member function 'void EEWL::begin()':
/home/drw/Arduino/libraries/EEWL/src/eewl.h:102:10: error: 'eepromBeginDone' was not declared in this scope
102 | if (!eepromBeginDone) {
| ^~~~~~~~~~~~~~~
closed with PR #8
Hi, I'm using this for ESP32 and it works great!!
Just want to ask, is this library support arduino core for RP2040 ? (https://github.com/earlephilhower/arduino-pico)