Open veryalien opened 3 years ago
The blinding bright RGB LED comes from totally out-of-date neopixel code, with bad timing. The neopixel code from the microbit micropython with the neopixel timing in assembler works correctly on the calliope. Unfortunately the calliopeled object needs to be completely re-written.
The i2c sda and scl pins were totally wrong for the calliope. I couldn't work out where they were getting set. I just hard-coded them in main.cpp and then the i2c bus could be scanned and all the devices were found.
I have followed the instructions to create a calliope mini version of the microbit micropython implementation. Unfortunately the hex that is produced by the yotta build does not seem to be calliope mini rev 2 compatible. The micropython hex runs on the calliope but the RGB LED is on all the time, it comes on after 10 seconds or so, when micropython eventually starts. led.set_colours(r, g, b) does affect the led, but there is always a bright white (r, g, b all set) always on 'behind' the colours I set with led.set_colours. led.clear has no effect on the bright white RGB LED, All micropython calliope classes appear to be available, so it is not compiling a microbit micropython version. Scanning for i2c devices with i2c.scan() gives an empty array. No devices are found. However, the pre-compiled calliope_micropython.hex which is in the github repository works ok. For example the RGB LED can be set, i2c devices (accelerometer, gyro and magnetometer) are found. I have tried building calliope micropython with bbc_microbit_classic targets with and without a softdevice. I have also tried calliope_mini_classic targets with and without a softdevice (which do not build). Why can I not successfully reproduce the calliope micropython yotta build correctly? What am I missing? Any ideas?