I2C Pins
Moderators: grovkillen, Stuntteam, TD-er
-
- Normal user
- Posts: 33
- Joined: 05 Jun 2017, 05:32
I2C Pins
Found out the hard way ESP Easy really doesn't like it when you reassign I2C pins, at least the way I did it.
I thought there might be a conflict if you wanted to use pins 4 and 5 while they were assigned to SDA and SCL, so I had reassigned them to pins 9 and 10 to SDA and SCL on a couple boards. 9 and 10 aren't available on a Wemos mini D1 or D1 pro, so I thought it would work out.
So the boards work fine for basic stuff, reading switch inputs, reading a temp device and setting relays.
But if I tried to do almost anything else, like sending a HTTP command for an event to start a rule, it would reset. Some serial commands caused resets too, I didn't try that many though.
After I figured out I should assign SDA and SCL back to pins 4 and 5, it works fine. And I can still use pins 4 and 5 for inputs or outputs, so I didn't need to worry about it.
I am using version 120.
It would be nice not to allow pins 9 and 10 for SDA/SCL since it causes this behavior. Keep others out of trouble lol.
Randy
I thought there might be a conflict if you wanted to use pins 4 and 5 while they were assigned to SDA and SCL, so I had reassigned them to pins 9 and 10 to SDA and SCL on a couple boards. 9 and 10 aren't available on a Wemos mini D1 or D1 pro, so I thought it would work out.
So the boards work fine for basic stuff, reading switch inputs, reading a temp device and setting relays.
But if I tried to do almost anything else, like sending a HTTP command for an event to start a rule, it would reset. Some serial commands caused resets too, I didn't try that many though.
After I figured out I should assign SDA and SCL back to pins 4 and 5, it works fine. And I can still use pins 4 and 5 for inputs or outputs, so I didn't need to worry about it.
I am using version 120.
It would be nice not to allow pins 9 and 10 for SDA/SCL since it causes this behavior. Keep others out of trouble lol.
Randy
Re: I2C Pins
As far as I know GPIO9/10 are used to access SD memory and cannot be used for anything else otherwise the ESP will quite surely reset (just some old boards seems to be ok to use those pins)...
If you don't use I2C you can always leave those 2 "empty" in the hardware tab and all will work as you have already see
If you don't use I2C you can always leave those 2 "empty" in the hardware tab and all will work as you have already see
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
-
- Normal user
- Posts: 33
- Joined: 05 Jun 2017, 05:32
Re: I2C Pins
OK, that makes sense.papperone wrote: ↑05 Jul 2017, 23:45 As far as I know GPIO9/10 are used to access SD memory and cannot be used for anything else otherwise the ESP will quite surely reset (just some old boards seems to be ok to use those pins)...
If you don't use I2C you can always leave those 2 "empty" in the hardware tab and all will work as you have already see
But then why is it even an option to use 9 and 10 for SDA/SCL?
Some idiot like me will pick them, and then regret it.
I don't remember an option for blank, I'll check that tonight.
Re: I2C Pins
as I wrote it's been reported that in some old boards GPIO9 (and maybe 10) can work without any issue, while in the majority of the current modules (Wemos D1 Mini 100% sure) it causes reboot if used
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
Re: I2C Pins
I've tested this with several boards and bare ESP-12E/F on my own PCB's.
My result: Refrain from unsing GPIO9/10 whereever possible.
If you need an additional GPIO and decide to use these GPIO's, test your setup thoroughly.
As with many GPIOs (0,2,15...) these pins have more functions then GPIO only.
They may work in your environment - or not.
Example:
You may use GPIO0 as an input. But it has to be "high" on booting, otherwise the ESP
will boot into flash mode. If your circuit supports this - nice.
Took me a while to get an IR receiver to work on GPIO0 of a ESP-01 and reliable booting it....
Anyways, maybe have a look at https://www.letscontrolit.com/forum/vie ... IO9#p15919
Regards
Shardan
Regards
Shardan
Shardan
Re: I2C Pins
I agree Shardan, my statement was just to asnwer that GPIO9/10 are still available as a choice as far as user aknowledge there are limitations (as well i can confirm I've no module that can work with GPIO9/10 but I've read here in the forum with older modules it is possible)
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone
-
- Normal user
- Posts: 33
- Joined: 05 Jun 2017, 05:32
Re: I2C Pins
One other suggestion is to add this to the wiki, to warn people not to use pins 9 and 10 for I2C as it may break other functions and cause resets.
Or at least I hope this thread will help others in the future.
Randy
Or at least I hope this thread will help others in the future.
Randy
Re: I2C Pins
Hello Randy,randytsuch wrote: ↑06 Jul 2017, 16:36 One other suggestion is to add this to the wiki, to warn people not to use pins 9 and 10 for I2C as it may break other functions and cause resets.
Or at least I hope this thread will help others in the future.
Randy
the wiki is undergoing many changes these days.
I thin these things and possible issues will be in the wiki when done.
Regards
Shardan
Regards
Shardan
Shardan
Who is online
Users browsing this forum: No registered users and 49 guests