@firehopper I solved the problem by downloading the M5StickC Master from GitHub (https://github.com/m5stack/M5StickC) and use the library from there in my project. The M5.I2C Method is quite new as you can see here: https://github.com/m5stack/M5StickC/commit/6e590f8e4ed5ffaaf989af7628bf421587e15eb8
Best posts made by hague
-
RE: issue compiling m5stickc joyc.ino in arduino.
-
RE: Atom Lite ENV II with 3A mini Relay
You are using the GPIO 26 for the I2C connection to the BMP280 and SHT30 sensors. Then you can't use this pin as GPIO to switch the relay at the same time.
For the Relay, you will need a GPIO pin. For the BMP280, you will need I2C. This puts you in a dilemma if you only want to use the Grove connector. You can use the peripheral pins on the bottom side of the ATOM lite. Check this pin mapping:
https://docs.m5stack.com/#/en/core/atom_lite?id=peripherals-pin-map
There you can find 5V, GND and some free GPIOs. That should work.Alternately you can buy the EXT.IO GPIO Expander:
https://m5stack.com/products/official-extend-serial-i-o-unit
Then, you can address 8 additional GPIOS via I2C. -
RE: M5.BtnA.wasPressed() conflicts with WiFi?
The problem can be solved with a delay(20); at the end of the loop() function. 10ms was not enough on my system, but 20 does not show any more ghost keystrokes.
-
Swollen M5Stack Battery.
Hello,
On one of my M5Stack devices the battery in the bottom module is swollen. That worries me!
I have used the M5Stack with the additional battery module. Then both batteries are connected in parallel, right?
Can that be the cause? Has anyone ever observed this when using the extra battery module?
-
RE: M5 Stickc Arduino samples - Temperature reading issue
I can confirm that it is related to the radiation from the M5StickC. When I connect the ENV-HAT with cables away from the stick, the sensor measures reasonable values.
Incorrect values if the ENV-HAT is directly connected:
Correct values if the ENV-HAT is connected via a cable extension:
Latest posts made by hague
-
RE: M5.BtnA.wasPressed() conflicts with WiFi?
The problem can be solved with a delay(20); at the end of the loop() function. 10ms was not enough on my system, but 20 does not show any more ghost keystrokes.
-
RE: How to program the M5stack fire RGB LEDs SK6812
@ajb2k3 No it's not a Grove pin.
Check here:
https://github.com/m5stack/m5-docs/blob/master/docs/en/core/fire.md -
RE: 1-wire and SD-Card
@zontex OK, you're right, without code it's hard to help. Sorry, my mistake.
In the meantime, I tried a little more to understand the problem better. It's not that the 1-Wire connection doesn't work anymore at all. It's just that the devices are no longer found immediately on the bus after a lot of data has been written to the SD card.
In detail, this call does not find any devices after I have previously written a large block of data to the SD card:DS18B20.begin(); device_count = DS18B20.getDS18Count();
But if I call DS18B20.begin() twice, all devices are found. Therefore I have placed the function in a loop:
int trial_count = 0; int device_count = 0; do{ DS18B20.begin(); device_count = DS18B20.getDS18Count(); trial_count++; } while (device_count == 0 && trial_count < 10); M5.Lcd.printf("\nDevices found: %i\nafter %i tries\n\n", device_count, trial_count);
Now all devices are found after one call, if I did not write any data to the SD card before. However, if I write a larger amount of data to the SD card in between, then 2 attempts are needed until all devices are found.
I think the 1-Wire bus is somehow disturbed by the transfer of the large amounts of data. This does not happen with small data. Anyway, the solution is OK and makes sense.
-
RE: Atom Lite ENV II with 3A mini Relay
You are using the GPIO 26 for the I2C connection to the BMP280 and SHT30 sensors. Then you can't use this pin as GPIO to switch the relay at the same time.
For the Relay, you will need a GPIO pin. For the BMP280, you will need I2C. This puts you in a dilemma if you only want to use the Grove connector. You can use the peripheral pins on the bottom side of the ATOM lite. Check this pin mapping:
https://docs.m5stack.com/#/en/core/atom_lite?id=peripherals-pin-map
There you can find 5V, GND and some free GPIOs. That should work.Alternately you can buy the EXT.IO GPIO Expander:
https://m5stack.com/products/official-extend-serial-i-o-unit
Then, you can address 8 additional GPIOS via I2C. -
1-wire and SD-Card
Hello,
I have the problem that I can no longer address 1-Wire DS18B20 sensors when I have accessed the SD card. I have already tried connecting the sensors to different pins (2, 5 and 26). Without accessing the SD card, I can query the sensors without any problem.
What can be the reason for this?
I have used several libraries for the DS18B20 sensors in combination with the oneWire library from Paul Stoffregen
-
RE: Grove PORT A for both Onewire and i2c sensors
Maybe it would be an idea to use an I2C to 1-Wire converter? Like the DS2482-100. Then you can have several I2C devices on the bus and also 1-Wire devices. I have not tried the chip yet. But I will do that soon.
-
RE: How to connect 2 ToF Sensors to a M5Stack Fire
The I2C address of the VL53L0X can be changed by a software command. But this is only possible, if only one sensor is connected, because all sensors have the same address, when they are switched on.
You can first connect one of the sensors and change the address of this sensor. Then you can connect the second sensor. Now you have two sensors with different addresses.
Unfortunately the sensor forgets the changed address at a restart. Or more precisely, when it loses its supply voltage.
I hope this helps. -
RE: [Solved] UnitV unable to find april-tags
@kylebuttress Same as for the M5StickV
M5StickV_Firmware_v5.1.2.kfpkg
and
maixpy_v0.5.0_98_gbd7c7ab_m5stickv.bindownloaded here:
https://dl.sipeed.com/MAIX/MaixPy/release/master -
RE: UnitV Barcode scanning
Hi, Maybe flipping the sensor image will fix this:
sensor.set_vflip(1)
This was the solution for my problem with april tags and QR-Codes.
-
RE: [Solved] UnitV unable to find april-tags
OK, I found the cause: The image from the camera was mirrored. So the tag could not be detected. I found the error when I tried to detect QR codes:
Then I added the following line of code to mirror the image:
sensor.set_vflip(1)
After that, the QR code was detected correctly:
Now, also april tags are working: