2RELAY on Core2 v1.13.6
-
Hi @cryptospok .
In my tests, I received that error when there was a conflict with the I2C address.
I used Uiflow V1.13.6; it’s a short text for 2Relay, and I also had trouble finding it.
I’m sending you the modified version that includes storing the I2C address in EEPROM.
If you need to save the state of the relays, you can also store it in memory.
Saludos
Roberto -
Hi @cryptospok .
-
This post is deleted! -
Hi @Robertof,
I reproduced and understood your code, but as you can see in the images, nothing happens.
I'm also using UiFlow 1.13.6, it seems that there is some error in the module library...
I'm testing with only one 2RELAY module at a time, but both have the same problem.
I think the connection is fine... if I put the battery module underneath, the Core2 works without the USC-C connection, that is, with the attached battery (M5GO2 module).
Could there be an update in the Core2 firmware?Thank you very much for your help!
-
Hello @cryptospok
something is very strange. Try a simple internal I2C scan and see if the 2Relay module shows up.
- Without any 2Relay module stacked the result should be: [52, 56, 81].
- With one 2Relay module stacked the list should be something like: [37, 52, 56, 81].
Note: I don't have an 2Relay module so I cannot test this myself.
Thanks
Felix -
Hi @felmue,
With one 2RELAY module, the result is: [52, 56, 64, 81, 102] and without is [52, 56, 64, 81]...
Sorry, I'm just starting with this...
Thank you very much... -
Hello @cryptospok
ok, I sorted the list w/o 2Relay out. I was testing with an M5Core2 v1 initially and it looks like you have an M5Core2 v1.1. So I re-run the test with an M5Core2 v1.1 and with that I get the same result [52, 56, 64, 81] as you without 2Relay.
So that would mean your 2Relay for some reason is using I2C address 102 (decimal) which is 0x66 (hex).
Try to run below code and hopefully that will work.
Thanks
Felix -
@felmue, the screen shows numer 1, only...
-
Hi @cryptospok
“It is correct that it gives you 1, it is the firmware version (I have the same version), now you can breathe easy. In the example I sent you, change all the 37s to 102 and the texts 0x25 to 0x66. It should work. -
Hello @cryptospok
like @Robertof says -
1
is the firmware version. At least now you know your 2Relay is alive, your M5Core2 can finally talk to it, and which I2C address it is using. (And if you are ever in doubt again, you can use the I2C scan method again to find its current I2C address.)Thanks
Felix -
This post is deleted! -
@Robertof ab @felmue, thank you very much!
Now everything works!I finally understood what was going on... I did some tests and then I managed to put an address in one module, then in the other and then I can access both at the same time. One of them was at 0x32 and the other at 0x33. I need 4 relays for my project... now the conditions acquired by a BME688 will change the states of the relays.
You helped a lot, not only to solve my problem but also to understand the process.
Success and health to you all!
-
Hello @cryptospok
you are welcome. I am glad to hear you got it working the way you wanted.
And you!
Thanks
Felix -
Hi @cryptospok .
I’m glad you resolved it. I also experienced the frustration of not being able to solve the problems and seeing time pass without finding a way out. Fortunately, Felix was there to advise me and provide an example that I could adapt to my needs. Good luck with that project, and we’ll meet again around here.
Until next time,
Roberto. -
Hi @felmue
Friend, thank you very much for your interest in our problems.
Cheers.