kidsbits blocks coding reed sensor is fully compatible with kidsbits control board and Lego building blocks.
You can easily connect it to kidsbits control board for communication using an RJ11 cable without worrying about wrong connection and damage.
This is a small device called a reed switch on the module.
When the device is exposed to a magnetic field, the two ferrous materials inside the switch pull together and the switch closes. The signal end outputs Low level, so LED turns on.
When the magnetic field is removed, the reeds separate and the switch opens. The signal end outputs High level, so LED turns off.
You can mount reed switch on the door for alarming purpose or as switches.
2. Technical Parameters
- Interface: EASY plug
- Operating voltage: DC 5V
- Output signal: digital signal
3. Wiring Diagram
4. Import kidsbits library
Begin with the Mixly blocks coding, you should first import the corresponding kidsbits library for those sensor modules.
Connect the control board to your computer using a USB cable.
Then open the Mixly blocks software 0.998, set the board to UNO R3, select your correct COM port. On the upper right corner you can switch the language.
After that, click Import, import the keyes-kidsbits library. Shown below.
If import custom library successfully, you should see the sensor module library shown below.
Click on the display screen block of keyes_kidsbits, you can directly use the corresponding module.
5. Test Code
Open or directly drag the Mixly code of reed sensor to the Mixly window.
Check the C language code:
6. Test Result
Hook it up and upload the code success, powered on, if you put a magnet close to the reed module, both D13 indicator led and LED on the reed module will turn on. If take away the magnet, you should see the two indicator lights turn off.