Connection
Example of temperature sensor connection
The temperature sensor can be easily connected to the universal jig for micro:bit using an IDC cable. The operating instructions for the universal jig can be found at the following link.
Thermometer – Module Connection
- Yellow cable: signal wire – connect to terminal Y (yellow)
- Red cable: power wire – connect to terminal R (ed.)
- Black cable: ground wire – connect to the terminal B (black)
Connection Module – Universal fixture (micro:bit)
Use a six-wire ribbon cable terminated with an IDC connector. First plug the IDC connector into the universal fixture at position 1 (pin 2) and then plug the other end into the temperature sensor module. The IDC connector has a groove that allows it to be plugged in only in the correct direction.
Program
Basic program
When starting the program, we first initialize the display using the “connect LCD at I2C” block with address 39, which is fixed for the LCD1602 display. We then print text on the display, such as “OMG Robotics” or the name of your school, and after a short pause, we clear the screen. Then we set the text on the first line, which remains unchanged during the program – ideally the name of the quantity and its unit. We also set the position and alignment of the text.
In the “forever” loop, we continuously display the measured value on the second line of the display. We read the data from position 1 of the universal fixture, where the temperature sensor is connected. We round the measured value to one decimal place and then display it as a numerical output on the display.



