hello
just getting my microbit (together with a Calliope) and various Grove sensors. I found that the barometer sensor (BMP280) won’t work together with the other Grove sensors like the 4 digit display.There are two different extensions/packages to load and I assume that these two extensions conflict with each other as I can use each one individually.
I wonder if the Grove extension for the microbit will be extended by newer sensors (e.g. barometer sensor BMP280, quad alphanumeric display,…)?
My intension is to build some kind of a weather station with the barometer sensor and display the values on the new quad alphanumeric display. First it should run on a microbit an next on a Calliope.
Any support is welcome.
Hi,
What problem you are facing while working with barometer sensor (BMP280) and 4 digit display? Can you please elaborate the issues.
I have noticed that there are two extensions for the BMP280 sensor available in the makecode evironment of the microbit: pxt-bmp280 (1.0.8) and BMP280 (1.1.0). Only the later one is working now with my microbit.
I have learned from the Calliope Forum that micobit is doing floating point math now, so maybe pxt-bmp280 is an older version?
Now if I also load the Grove extension package I would expect to show the temperature and the pressure on the 4-digit display. But unfortunately only the temperature is displayed correct (e.g. 24°C). The pressure won’t show correct on the 4-digit display: only two digits are displayed. Either the last two or the first and the last one. Pressure is divided by 100 and ‘floored’ so it is hectopascal. Currently 945 hPa and the 4-digit display shows “__45” or “_9_5”.
And for the brightness I could not set it to see any differences.
Since the 5x5 display of the microbit shows the values (temperature and pressure) correct I assume that there is probably it is an issue with the voltage? I am using the Grove shield together with the microbit and the modules are connected to the Grove shield.
If the 4-digit display will show the barometer pressure correct I am quite close to what I am looking for. Next would be the alphanumeric display then.
just found out that the number 9 won’t be displayed on the 4-digit grove display at the 3rd position from right.
It all started with the barometer sensor BMP218 connected to the grove shield with a microbit inserted. When finally loading the appropriate extension the temperature and barometer values are displayed on the 5x5 display of the microbit as one would expect.
Connecting the 4-digit grove display just shows the temperature values correct 24°C but not the barometer value which is 945 hPa.
Trying various possible causes I found that if at the third position from right the number 9 should be displayed it won’t. To make sure I just set the variable to fix value 2936. And it will be displayed as “2_36”.
Switching from P1 to P2 has the same effect. And since I have a second 4-digit display and this one behaves exactly same way I assume that 4-digit displays are ok. But this is very strange to me.
Any ideas where to search for?
Maybe this post should be moved or renamed then would a moderator please do so.
Grove extension is v0.1.5
4-Digit Display is V1.0
Below you find the code I am using to test my configuration:
input.onButtonPressed(Button.A, function () {
_4DD.show(BMP280.temperature())
basic.showNumber(BMP280.temperature())
basic.pause(2000)
_4DD.clear()
})
input.onButtonPressed(Button.B, function () {
hPa = 2936
_4DD.show(hPa)
basic.showNumber(hPa)
basic.pause(2000)
_4DD.clear()
})
let hPa = 0
let _4DD: grove.TM1637 = null
_4DD = grove.createDisplay(DigitalPin.P2, DigitalPin.P16)
_4DD.set(2)
BMP280.Address(BMP280_I2C_ADDRESS.ADDR_0x76)
basic.showIcon(IconNames.Yes)
basic.pause(1000)
basic.showLeds(<br/> . . . . .<br/> . . . . .<br/> . . . . .<br/> . . . . .<br/> . . . . .<br/>
)