Built-in project · Arduino Uno R3

Analog kit modules on A0 to A3, on an Arduino Uno

A KY-035 Hall sensor, a TEMT6000 light sensor, a rotation sensor and a steam sensor on A0 to A3, printed twice a second. The whole build, an Arduino Uno and 4 more parts, runs here in your browser on the firmware below; open it in the editor to change the wiring or the code and run it again.

Teaching? Assign it to your class in one click.

Beginner Runs in your browser. Free, and no account needed.

The parts retail for about $38. On Mokxi they're free.

Analog kit modules on A0 to A3 · Arduino Uno R3live0.000 s 0.00x
Click to open it in the editor
The circuit itself, running here on the simulator. Press what can be pressed; click anything else to open it in the editor.

The code

The firmware exactly as the editor opens it. Change a line there and press Run: it compiles in the browser.

sketch.ino · Arduino Uno R3
// Four analog kit modules on A0 to A3.
//
//   KY-035 Hall S -> A0   TEMT6000 SIG -> A1
//   rotation S -> A2      steam S -> A3
//   every + (VCC) -> 5V   every - (GND) -> GND
//
// The Hall sensor rests at half the supply, about 512, and moves up for a
// south pole and down for a north. The TEMT6000 gives 5 mV a lux. The
// rotation sensor runs 0 to 1023 as it turns, and the steam sensor rises as
// its comb fogs.
//
// Drag the magnet, the light, the knob and the steam.

void setup() {
  Serial.begin(9600);
  Serial.println("Mokxi Uno: Hall, light, rotation and steam on A0 to A3");
}

void loop() {
  Serial.print("hall ");
  Serial.print(analogRead(A0));
  Serial.print("  light ");
  Serial.print(analogRead(A1));
  Serial.print("  knob ");
  Serial.print(analogRead(A2));
  Serial.print("  steam ");
  Serial.println(analogRead(A3));
  delay(500);
}

Parts list

6 parts, plus the jumper wires. They retail for about $38; on Mokxi they're free.

How it is wired

6 connections, pin by pin, read from the circuit itself. Each line is one set of pins joined together, by a jumper wire or a breadboard strip.

  • Ground: Arduino Uno R3 pin GND; Analog Hall sensor, KY-035 pin GND; Ambient light sensor, TEMT6000 pin GND; Analog rotation sensor pin GND; Steam sensor pin GND
  • Arduino Uno R3 pin 5V; Analog Hall sensor, KY-035 pin VCC; Ambient light sensor, TEMT6000 pin VCC; Analog rotation sensor pin VCC; Steam sensor pin VCC
  • Arduino Uno R3 pin A0; Analog Hall sensor, KY-035 pin S
  • Arduino Uno R3 pin A1; Ambient light sensor, TEMT6000 pin SIG
  • Arduino Uno R3 pin A2; Analog rotation sensor pin S
  • Arduino Uno R3 pin A3; Steam sensor pin S

Change it and keep it

Open it in the editor, change the circuit or the code, and keep your version in a free account.