Read Sensor Value

This guide will show how to get readings from an analog and digital sensor connected to the Grove port of the Maker Uno RP2040. 

 

Maker Uno RP2040 come with 6 Grove ports and one Maker port which are very useful for connecting various Grove modules and sensors easily. Not using Grove modules? No worries! you can use the provided Grove-to-female cables so you can still take advantage of this useful feature.

 

Analog Read

 

There are 3 Grove ports that have at least one analog pin. Figure below shows the Grove pins that you can use to read analog sensor value.

 

 

For this guide we will be using Maker Soil Module, which is an analog sensor. 

  1. Connect the Maker Soil module to the Maker Uno to of the three grove port that previously mention. For example we connect the to Grove 5 port of the Maker Uno RP2040. Figure below shows the connection between the module and the Maker Uno RP2040. 

 

 

 

Note: The DIS pin is the disable pin, where a HIGH signal will disable the sensor. This code does not use this pin.

  1. Open the Arduino IDE and make sure the correct board and COM port are selected.

  2. Copy and paste the folowing code to your Arduino IDE.

  3. Verify and Upload the sketch to your Maker Uno RP2040. If succesful, the reading from the sensor should be display in the serial monitor. Higher voltage means less moisture. 

 

 

Digital Read

 

For digital sensor, you can use any of the Grove and Maker ports. For this example we will use a generic module of HC-SR04 Ultrasonic Sensor. 

  1. Connect the Ultrasonic sensor to the Grove 2 port of the Maker Uno RP2040 via a Grove to 4 female pins cable.

 

 

  1. Open the Arduino IDE and make sure the correct board and COM port are selected
  2. Copy and paste the folowing code to your Arduino IDE. 

  3. Verify and Upload the sketch to your Maker Uno RP2040. If succesful, the reading from the sensor should be displayed in the Serial monitor. 

Hardware Components

Maker Uno RP2040

$14.90 $14.90

x 1 unit(s)