Electronic kits and parts - build, code, and learn!
  • Log in
  • or
  • Create account
Cart 0
Cart 0
  • Home
  • Blog + -
    • News
    • Learning Resources
  • Kits by Age + -
    • Ages 6+
    • Ages 8+
    • Ages 11+
    • Ages 14+
    • Ages 17+
  • Shop by Category + -
    • BBC micro:bit Starters
    • micro:bit Accessories
    • Combo Packs
    • E-Textiles / Sewable Electronics
    • Card / Paper Circuits
    • Bearables
    • Kits
    • Raspberry Pi and Microbit Cases
    • Adafruit CircuitPython
    • Robotics
    • Internet of Things (IoT)
    • Arduino + Accessories
    • Parts
    • Raspberry Pi 4 hardware
    • Raspberry Pi Zero
    • Raspberry Pi
    • Raspberry Pi HATs
    • Raspberry Pi Accessories
    • Clearance/Discounted items
    • Soldering Tools
  • Shop by Brand + -
    • 4tronix
    • Adafruit
    • Altronics
    • Chibitronics
    • DFRobot
    • Freetronics
    • Kitronik
    • MonkMakes
    • MakeyMakey
    • Micro:bit Foundation
    • Pimoroni
    • Proto-PIC
    • Raspberry Pi
    • SparkFun Electronics
    • Seeed Studio
    • Waveshare
    • Wemos
  • All Products
  • Log in
  • Create account
smalldevices

Electronic kits and parts - build, code, and learn!

  • Home
  • Blog
    • News
    • Learning Resources
  • Kits by Age
    • Ages 6+
    • Ages 8+
    • Ages 11+
    • Ages 14+
    • Ages 17+
  • Shop by Category
    • BBC micro:bit Starters
    • micro:bit Accessories
    • Combo Packs
    • E-Textiles / Sewable Electronics
    • Card / Paper Circuits
    • Bearables
    • Kits
    • Raspberry Pi and Microbit Cases
    • Adafruit CircuitPython
    • Robotics
    • Internet of Things (IoT)
    • Arduino + Accessories
    • Parts
    • Raspberry Pi 4 hardware
    • Raspberry Pi Zero
    • Raspberry Pi
    • Raspberry Pi HATs
    • Raspberry Pi Accessories
    • Clearance/Discounted items
    • Soldering Tools
  • Shop by Brand
    • 4tronix
    • Adafruit
    • Altronics
    • Chibitronics
    • DFRobot
    • Freetronics
    • Kitronik
    • MonkMakes
    • MakeyMakey
    • Micro:bit Foundation
    • Pimoroni
    • Proto-PIC
    • Raspberry Pi
    • SparkFun Electronics
    • Seeed Studio
    • Waveshare
    • Wemos
  • All Products

Resources — APDS-9960

Connecting I2C Devices to the BBC micro:bit

September 18, 2017 • APDS-9960 • BBC micro:bit • DFRobot • I2C • micro:bit • microbit • MicroPython • Python • Sensors

Connecting I2C Devices to the BBC micro:bit

The BBC micro:bit supports the I²C bus protocol, for communicating with other devices, like sensors. In this post, I've used MicroPython to demonstrate, but the principles can easily be translated to lower and higher level languages.

Read more →

Recent Articles

Program a micro:bit with Python to Control a Water Pump
March 24, 2021

Project Tutorial: Make a number base Converter
January 17, 2021

Use Python to calibrate your Kitronik Prong Moisture Sensor
September 23, 2020

Quick Tip: Assembling the Kitronik Prong
September 21, 2020

STOP:bit MicroPython Tutorial: Two Traffic Lights
August 15, 2020

Categories

  • Adafruit
  • airplay
  • APDS-9960
  • arduino
  • audio streaming
  • BBC
  • BBC micro:bit
  • BBC microbit
  • BBC microbit v2
  • bitbot
  • button
  • Circuit Playground Express
  • CircuitPython
  • coding
  • DFRobot
  • dlna
  • firmware
  • halo
  • hex file
  • I2C
  • kitronik
  • led
  • LEDs
  • logic
  • m4
  • makecode
  • mathematics
  • micro:bit
  • micro:bit accessories
  • microbit
  • microbit accessories
  • microbit plant
  • microbit tips
  • microbit tutorials
  • MicroPython
  • microsoft
  • moisture sensor
  • mu editor
  • music
  • neopixels
  • old laptop
  • pimusicbox
  • player
  • podcast
  • program
  • programming
  • pump
  • PXT
  • pyrhon
  • Python
  • radio
  • raspberry pi
  • raspberry pi audio
  • Raspbian
  • robotics
  • scratch
  • Sensors
  • soil moisture
  • state table
  • steam
  • stem
  • Thonny
  • traffic light
  • traffic lights
  • tutorials
  • upload
  • wireless
  • ZIP

Latest News

The BBC micro:bit v2 is available in Australia at SmallDevices!

The BBC micro:bit v2 is available in Australia at SmallDevices!

The BBC micro:bit v2 has arrived in Australia! We have starter kits and 10-packs.

Links

  • Gift Vouchers!
  • Search
  • Learning Resources
  • Privacy

Newsletter

Sign up for the latest news, tutorials, and updates

Follow Us

  • Twitter
  • Facebook
  • Pinterest
  • Instagram
  • YouTube
  • RSS

Overseas orders

Orders from outside of Australia may be charged sales tax and import duties when received. These are not included in our prices.

Latest News

Program a micro:bit with Python to Control a Water Pump

Program a micro:bit with Python to Control a Water Pump

In this project, you will learn:

  • how a relay works;
  • how to use code to control a relay to turn a water pump on and off; and
  • how to automate the pump based on sensor readings.

You will need:

  • To have completed our previous tutorial for calibrating a moisture sensor, with the following:
    • a micro:bit, computer with mu editor Thonny editor, and microUSB cable for programming the micro:bit
    • a moisture sensor
Additional hardware required for this tutorial:
  • 1 x submersible pump and hose to fit
  • 1 x MonkMakes relay
  • 5 x crocodile leads to connect everything up
  • 1 x old water bottle or similar container to hold water

Copyright © 2021, smalldevices. Powered by Shopify

  • american express
  • apple pay
  • master
  • paypal
  • visa