Page 3 of 3

Re: esp32 i2c is not implemented yet

Posted: Fri Apr 23, 2021 9:08 am
by p.erasmus
Hi Leigh

Thank you for the clarification, :D

I ran into an issue I made a small project for the ESP32 Lolin board and I wanted to just write a simple configuration to the I2C device and in the main loop switch a led on and off, to start too learn how to use this transactions macro`s :oops:
In FC chart the call is now disabled and I could program and my led is flashing.
All is working until I call the Transaction_write then the build fail and obviously no programming.
I am not sure what I am doing wrong please help.

ESP_HW_I2C_Example.rar
(5.29 KiB) Downloaded 539 times

P4.jpg
P4.jpg (8.4 KiB) Viewed 6084 times

Re: esp32 i2c is not implemented yet

Posted: Fri Apr 23, 2021 9:32 am
by LeighM
Ah, good spot
Please could you change your DataArray from a string to a byte array

Default ESP compiler settings are somewhat pedantic about signed/unsigned mismatches
Hmm, something else for the WiKi :roll:

Re: esp32 i2c is not implemented yet

Posted: Fri Apr 23, 2021 9:40 am
by p.erasmus
AHH Leight
I will give it ago right now thanks a million :D

I am stupid again byte Arrays are new for me in flow code how do i do that ? :oops:
I thought always Strings are all so byte arrays in Flowcode :oops:
P5.jpg
P5.jpg (61.13 KiB) Viewed 6080 times

Re: esp32 i2c is not implemented yet

Posted: Fri Apr 23, 2021 9:48 am
by p.erasmus
OK I saw how Ben did it in his example I will try first
Thanks Leigh

Re: esp32 i2c is not implemented yet

Posted: Fri Apr 23, 2021 9:53 am
by LeighM
ByteArray1.jpg
ByteArray1.jpg (33.53 KiB) Viewed 6078 times
ByteArray2.jpg
ByteArray2.jpg (31.33 KiB) Viewed 6078 times

Re: esp32 i2c is not implemented yet

Posted: Fri Apr 23, 2021 9:55 am
by p.erasmus
Hura Success :D
Thanks a million Leigh :D

Just for me to be absolutely certain,I can now only use these transactions in I2C and it will probably work on PIC/AVR and ESP32-STM right no more Txbate and Rxbyte macros right?


P5.jpg
P5.jpg (37.93 KiB) Viewed 6078 times

Re: esp32 i2c is not implemented yet

Posted: Fri Apr 23, 2021 10:30 am
by LeighM
Correct, well done :D

Re: esp32 i2c is not implemented yet

Posted: Fri Apr 23, 2021 10:46 am
by p.erasmus
Hi Leigh

Thanks a million for all your help it is working fine now Transaction_read and Write so now I know how to implement the I2C in Future

:D :D
P6.jpg
P6.jpg (13.43 KiB) Viewed 6070 times