View VoltMeterFinal.ino
unsigned int analogIn = 0; | |
void setup() | |
{ | |
Serial.begin(115200); | |
} | |
void loop() | |
{ | |
for (int loopy = 0; loopy < 10; loopy++) | |
{ |
View VoltMeter2.ino
int myVoltageReading = 5.14; | |
unsigned int analogIn = 0; | |
void setup() | |
{ | |
Serial.begin(115200); | |
} | |
void loop() | |
{ | |
analogIn = analogRead(A0); |
View VoltMeter1.ino
int myVoltageReading = 5.14; | |
unsigned int analogIn = 0; | |
void setup() | |
{ | |
Serial.begin(115200); | |
} | |
void loop() | |
{ | |
analogIn = analogRead(A0); |
View matrix.ino
#include const byte ROWS = 4; | |
//four rows const byte COLS = 3; | |
//three columns char ke7','8ys[ROWS][COLS] = { {'1','2','3'}, | |
{'4','5','6'}, {'','9'}, | |
{'*','0','#'} }; byte rowPins[ROWS] = {8, 7, 6, 5}; | |
//connect to the row pinouts of the keypad byte colPins[COLS] = {4, 3, 2}; | |
//connect to the column pinouts of the keypad Keypad keypad = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); | |
View TempToLight.py
from microbit import * | |
import neopixel | |
np = neopixel.NeoPixel(pin0, 32) | |
while True: | |
tmp = pin1.read_analog() | |
temp = ((tmp * (3300.0/1024.0))-500.0)/10.0 | |
display.scroll(str(temp)) | |
tempcolour = int((temp * 3.6)) |
View TempSendColour.py
# Read and display the temperature | |
# and update the NeoPixel panel with | |
# a colour between Blue and Red, and | |
# send the data to any listening node | |
# | |
# (The micro:pixel panel is not needed) | |
# | |
# for WWW.PROTO-PIC.CO.UK by Drew Anderson | |
# |
View TempReceiveColour.py
# | |
# Receive and display the temperature | |
# and update the NeoPixel panel with | |
# a colour between Blue and Red | |
# | |
# for WWW.PROTO-PIC.CO.UK by Drew Anderson | |
# | |
# import the libraries required by the microbit | |
from microbit import * |