PiConZero by 4Tronix

This a great all-round board for interfacing to external electronic devices with excellent power options.

Additional steps to get working

You do have to follow these  4Tronix instructions as well to enable I2C

(Or alternatively use the built-in tool, raspi-config, and just follow the Step 1 instructions from here)

As with all addon boards – run the ScratchGPIO Plus version

To use a PiConZero in ScratchGPIO, make a variable called AddOn and set its value to PiConZero  when green flag is pressed (All ScratchGPIO is case-insensitive but I use capitals for readability)

As you can see from the examples on the left you can control the motors, set the outputs on or off, use the outputs as servo controls and even use power commands to vary their value using PWM.

Output 5 has an extra use to control Neopixels (WS2812 type RGB LEDS)   The full range of ScratchGPIO Neopixel syntax is available

The inputs can be used detect high or low values (they default to being held high by a software pullup resistor so that simply connecting the appropriate S pin to gnd (G Pin) will change it from a 1 to a 0

(If you don’t want the software enabled pullup, then use broadcast Set Digital X to remove it)

The inputs can also be changed to read analog voltages from 0 to 3.3V or read temperatures from DS18B20 sensors

Note – need to multiply the sensor reading by 0.0625 to convert to degrees Celsius when using a DS18B20 – thanks to Peter King for noticing this