Hi guys, I’m trying to configure an ESP32U to use PiicoDev modules and it’s raising an exception.
Exception: Please input bus, machine.pin SDA, and SCL objects to use ESP32
I think I need to define the ESP, bus and pins under SYSNAME in the PiicoDev_Unified.py file and import it but I’m just not sure how to do it.
I’m using pin 21 for the SDA and pin 22 for the SCL.
The modules I’m using seem to be connected OK and both report an address when I do an I2C scan.
Any info would appreciated.
Thanks for that Liam, I was able to get a PiicoDev_TMP117 functioning using your suggestion. I had to drop the freq to 1000000 before it started communicating with the ESP.
I think I my RTC module is dead though, it was reporting different addresses every time I ran an I2C scan and then it just stopped reporting an address altogether.
The first time I tried connecting the modules to the ESP I was using the PiicoDev header from a Raspi connect to the SDA,SCL and power lines to the ESP and I couldn’t get anything to show up on an I2C scan, so I soldered a header directly onto the modules and omitted the Raspi header & that worked fine. I think I killed my RTC module when I soldered the header pins to it, one small component seems to be slightly out of position now, maybe I can shift it back with a bit of heat.
Does the Raspi PiicoDev header have resistors on the SDA and SCL lines that could have caused issues when connected to an ESP32?
I had to lower the clock rates on a couple devboards.
Would it be possible to send through a photo?
The expansion boards for Pico and RPi, both have pull up resistors and the Pico also includes inline resistors to stop over and undershoot.
It very much depends on the setup though, would it be possible to send through a photo?
I used the female prototyping wires directly from the pin headers.
I can’t a send pic right now, I’m just heading out. I’ll send one when I get back.
Thanks again mate, the PiicoDev costs a few bucks more than how I’d normally do things but being able to just plug them in & daisy chain them makes it much easier to get my son coding without any wiring issues to dampen his enthusiasm.
Here’s a few pics of how I had it setup Liam. One is connected to the female header that the PiicoDev adaptor came with and the other one is connected to a male header pin I soldered onto the adaptor.
So it works fine through the male header, but not the original female header. I’m sure it had power to the attached module last night when it was connected to the female header but the led on the module wasn’t even coming on today. I checked the wiring and it all seemed fine.
As it turns out I didn’t overheat the RTC clock module when I soldered the header onto it, my son was playing with it last night after I went to bed and he said it got very hot, so he unplugged it and put it away. Maybe he connected the power lines to the wrong pins. I tried to salvage it but reflow soldering with an ordinary soldering iron was too much of a challenge for me and I couldn’t save it.
Its a bit hard to see what you have connected but if you are powering everything with 5V that will fry some modules and its outside of the PiicoDev operating range.
It’s just a prototype to test the drivers & I have it connected to the 3v3 pin on the ESP (sorry for the crappy images). I bought a few PiicoDev adaptors and splitters from the store today, so I’ll probably print a small case and solder the wiring to an adaptor so it’s a plug and play system with some sockets exposed to plug the modules into.
It will make a versatile test rig for my son to learn about coding, I have a pico so I’ll use one of the expansion boards you suggested & make something similar out of that too.
One last question before I let this topic fade into the Aether.
I had a BME208 & a TMP117 attached the ESP and both were working fine together. The TMP was attached to the ESP through header pins I’d soldered onto it and the BMP was daisy chained to it with a PiicoDev cable.
I unplugged the BMP while the script was running and the TMP was still connected to the ESP. My script was very simple and didn’t have error handling, so it kept running and reported the TMP data and returned no values for the BMP.
Then I noticed the LED on the TMP module was flashing. When I looked at it the 3v wire was not attached, just the GND, the CLK and SDA lines but it was still sending data to the ESP.
If I start the script without the power wire attached it won’t work or show up on an I2C scan but if the power wire comes off after the script begins it keeps sending data.
Does the CLK line supply enough power to keep it alive, or was it still functioning for some other reason?
With power disconnected the setup enters the land of unreliability, both pins are pulled up to 3.3V on the module so there are connections to that pin there but no real amount of power can flow through those.
This isn’t a good way of using the modules.
The best way would be disconnecting power to the ESP, then changing your Piicodev setup
Yeah, it was just an accident that happened due to the dodgy setup I had that you saw in the pictures. I unplugged it as soon as I noticed. I soldered some wires to a splitter (the solder points built into the modules add to the PiicoDev systems versatility for other micro controllers like I’m using) and I’m printing a header for the ESP so the connections won’t be able to dislodge.
I’ll include a SPI port with a JST connector and a few gpio’s with JST connectors in a printed case and I’ll have a plug and play rig for my son to play with so he won’t have to resort to dodgy connections like I had when I was testing it.