Comments: micro:climate Kit Experiment Guide
Looking for answers to technical questions?
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
If you've found an issue with this tutorial content, please send us your feedback!
What functions of the micro:climate kit are available via i2c? Are most of the sensors available there to another host (eg rPi Pico or an ESP32 with LoraWAN support)? Reading the github code there are some things that are apparently brought out only as digital lines on the MicroBit connector.
I'm looking for an expandable weather station kit that could be used for unattended remote data gathering. There are some sensors this system doesnt provide (light, UV, dust, etc) that we already have working with a Pico. Ideally, the wind, rain functions etc of this kit would be accessible via i2c to the Pico (or ESP32). Less ideally, we would need to add a microBit and force it to talk to another microcontroller to handle the communications.
Also (perhaps better as another comment) what is expected power draw of this kit (w/microbit writing to SD)? I'm figuring a decent Solar Power Bank (usb battery + solar charger) should keep it running indefinitely.
The pressure sensor readings are incorrect in MakeCode extension v0.0.19. Altitude appears non-functioning as well. Pressure works in v0.0.12 (what the tutorial currently uses). There is a BME280 standalone extension from another developer that is working well as a workaround for now for anyone else with this issue. It already provides the sensor value conversions and offers a drop-down for US/Metric units.
Hi, I am trying to read the soil temp sensor and get back a 409593.75 value, and don't change in probe change temperature. Hope you can help me or guide me through this. I trie it in class with 4 different se-ups and same error came.
Hi,
This sounds more like a technical question.
Check Your Connections
Testing Experiment 4 with a Micro:bit 2.0, I was able to see value of
409593.75
from the temperature sensor when it was not connected. Make sure check your wiring colors with each pin and tighten the screw terminal labeled asSOIL TEMP
.Debugging and Delays
The original code in Experiment 4 did not have the serial output included in the example. Try adding the
serial redirect to USB
code block from theSerial
extensions in theon start
code block. Then add theserial write line
and reading thetempC
orsoil temperature(C)
variable. Finally, add a small delay by using thepause (ms) 100
block from theBasic
extension. The Micro:bit might be executing code too fast in theforever
loop. Adding a small delay will help give the temperature sensor some time to provide the sensor readings.Weather:Bit Extension
I am not sure what Weather:Bit Extension you are using. Try clicking on the Javascript button to switch to the text based coding. The weatherbit extension version that you are using will be provided on the left hand side of the page. I tested on 0.0.12 and 0.0.19. Both versions seemed to work fine after checking the connections and adding a small delay.
Otherwise, I recommend checking out our technical assistance page for the best support.
I tried all the option and the error is still the same. I am using a Microbit 1.0, do you thing this can be the issue? The version of the extension is 0.0.19.
Just to link the conversations that we have had in the tutorial comments and SparkFun forums => https://forum.sparkfun.com/viewtopic.php?p=233084 .
I just tested with a Micro:Bit v1.0 and am seeing the same issue that you are where the value is a constant value of
409593.75
. :\ I'm not sure the exact reason why you are not able to read the sensor. Talking briefly with my coworker that has updated a few of the our extensions, most likely it has something to do with the way MakeCode editor 2.0 passes data (i.e.char
vsint8
is one example).I do not have an exact timeline of when the weather:bit extension will be updated but I did find a workaround. There is another 3rd party extension that you can use for the DS18B20. Try doing a search for "DS18B20" and adding the microbit-dstemp. Then select the temperature pin on
P12
.MakeCode Editor Version
Hmm, It's possible. There was an update to the MakeCode environment to v2.0 that broke a lot of the extensions. A co-worker patched a few of the extensions but made them backward compatible. If it was working for Micro:Bit 2.0, it should work for the Micro:Bit 1.0.
Reinstalling the Weather:Bit Extension
Another thing to try that might work is to click on the track can button next to the weatherbit extension's version number. Then reinstall the extension and code blocks in the example.
DS18B20 and weather:bit
You stated that you tried connecting it four different times. Were you trying to connect four different DS18B20 temperature sensors to four different weather:bit carrier boards?
Let me test it out on my Micro:Bit v1.0 to see if I can recreate what you are seeing. It's on my desk at work.
would there be a way to disable the BME280 so the entire weatherbit/battery/electronics etc can be enclosed in a NEMA4X container and hook up the BME280 externally?
Unfortunately no, not without desoldering the one that's already on the board or cutting a few PCB traces to the existing chip. :-( Trying either could destroy the whole board unfortunately.
what about using a quiick SEN-15440 and just read that. I am sure a second sensor can be added. Is the original in the weather-bit 0x77? so then I could read 0x76 for the external sensor.
That would work, I wasn't aware you could change the address on the BME280 on the Qwiic board. You just don't want to have two devices with the same address on the same bus at the same time. The one on the weather:bit is set to 0x77 so just set the other to 0x76 and make adjustments in your code to address the external sensor and you should be good. :-)
Are the weather bit libraries not available in micro python?
Currently, there are no weather:bit libraries in MicroPython. Doing a brief search online, it looks like there are some libraries for the BME280 and DS18B20 but I have not tested it with the micro:bit. I did not find any examples for a weather meter so that would probably need to be ported over.
Where did you get the clear case to keep the weather bit and micro bit dry?
The clear case is acrylic. You might be able to find it at hardware stores like Home Depot. There's a local hardware store by SparkFun that I sometimes go to that has it. Try looking up "acrylic" to find one by you location.
However, you probably want to invest in a solar radiation shield. Nate tested out a few enclosures for his weather station with Arduino a few years ago. He found that this was the best for airflow for the sensors and to avoid heating up from the electronics from direct sunlight.
Help, so I am new to all this coding stuff, do you have complete code package I can load and walk through? Also explanation on 2nd mirobit as a remote monitor
Thanks
The tutorial is up if you have not tried using the radio function yet. Enjoy! => https://learn.sparkfun.com/tutorials/wireless-remote-weather-station-with-microbit
Hi,
Each experiment in this guide should have a download button and a way to open the code in MakeCode editor. If you open the GitHub repository for the weather:bit, you can find the code to upload to your micro:bit as well GitHub / Micro_Bit_Weather_Bit / Firmware / micro_climate Kit Experiment Guide .
As for an explanation for the 2nd micro:bit and wireless mode, there should be a radio block to enable wireless communication. I am currently working on a tutorial explaining how to set it up.
I think upon further reading I have answered my question, now just to figure out why my micro:bit keeps giving me a 'write protected' error when I try to upload to it. I may try it from a different computer, this one could have its usb ports locked down since its a work laptop.
Hi - On the climate kit Product Page it's stated ""We even included an extra experiment that includes wireless communication between two micro:bits to be able to monitor the weather without being exposed to it." Where is this in the experiment guide? Thanks. Darrell, Mission Viejo, CA
Hi,
I was updating something on this page and noticed your comment. If you set up the radio module, you can send the data from a transmitting micro:bit to a receiving micro:bit. MakeCode makes it easy to do that. Try looking here at the wireless RC micro:bot for more information on setting up a radio module to start => [ https://learn.sparkfun.com/tutorials/wireless-remote-control-with-microbit/experiment-1-sending-and-receiving-a-signal ]. Instead of using numbers, you would send the values.
A note on Experiment 5: As the write up says, the wind vane detects 16 different directions, and the Wind Direction routine in the makeCode package only decodes 8 of these. So, if you want wind direction that works more than half the time, you do need to do your own decoding (of the analogRead of pin P1). Actually, P1=255 more than half the time (the voltage on P1 appears to be zero when this happens, so the reed switches are likely not closing?). The values of P1 that I observed are as follows (there is some variability, so a +/- 4 range is probably appropriate):
Hello! I re-read the experiment and looked at the code and I think the verbage could be re-worked because it is a bit confusing. We read resistance at 16 different loci and then use those values to calculate the cardinal directions we list in the experiment: N,NE,E,SE,S,SW,W,NE. In the makecode package, the standard deviation on these values is +/- 10 which gives me pause when looking at gradations of NNE, ENE, ESE, etc. I'm logging an issue to look at the statistical analysis to verify we can get consistent accuracy with these extended directions. If it makes sense to update the makeCode (and the experiment) we certainly will. Thank you!
I'm working with the weather:bit. I'd have the weather:bit micro:bit transmit a comma delimited string to a 2nd micro:bit. I can't figure out a way in Makecode Blocks to break down the comma delimited string into multiple variables. Nor can I figure out a way to transmit an array.
Any help would be appreciated.
The MakeCode for Experiment 1 does not work. Please note the following comment in the GitHub repository:
Also, "send your feedback" doesn't work, hence this comment.
Sorry for the delay in reply. There was some issue filed in the GitHub repository about this and it has since been fixed => [ https://github.com/sparkfun/pxt-weather-bit/issues/11#issuecomment-394456714 ]. The code linked in this tutorial have been updated to reflect the package version.