Testato / SoftwareWire

Creates a software I2C/TWI bus on every pins
GNU General Public License v3.0
148 stars 33 forks source link

Error compiling for NodeMCU in Arduino environment #10

Closed AlexZibin closed 6 years ago

AlexZibin commented 6 years ago

Hi,

The Arduino compiler reports the following error:

Documents\Arduino\libraries\SoftwareWire\SoftwareWire.cpp:146:16: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment
   _sdaPortReg  = portOutputRegister(port);
                ^
Using library SoftwareWire at version 1.4.1 in folder: Documents\Arduino\libraries\SoftwareWire 
Using library Rtc_by_Makuna at version 2.0.2 in folder: Documents\Arduino\libraries\Rtc_by_Makuna 
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).

Compiling for Arduino Nano goes correct without any errors.

Please help to compile for NodeMCU without errors, thank you in advance!

Koepel commented 6 years ago

Thanks, that is indeed not implemented. The registers and bits are stored as 8-bit variables for the AVR family microcontrollers. The ESP8266 has registers of 32 bits.

The Wire library for the ESP8266 is already a software Wire library. Why did you change to this one ?

The most compatible library is the SlowSoftWire. That is a wrapper around another library, so you need both. Those libraries use only normal digitalWrite() and digitalRead().

AlexZibin commented 6 years ago

Thank you for prompt answer!