Skip to content

Instantly share code, notes, and snippets.

View proto-pic's full-sized avatar

Proto-PIC Team proto-pic

View GitHub Profile
@proto-pic
proto-pic / VoltMeterFinal.ino
Created May 16, 2017 14:32
Arduino Based Volt Meter - Final
unsigned int analogIn = 0;
void setup()
{
Serial.begin(115200);
}
void loop()
{
for (int loopy = 0; loopy < 10; loopy++)
{
@proto-pic
proto-pic / VoltMeter2.ino
Created May 16, 2017 14:30
Arduino Volt Meter - V2
int myVoltageReading = 5.14;
unsigned int analogIn = 0;
void setup()
{
Serial.begin(115200);
}
void loop()
{
analogIn = analogRead(A0);
@proto-pic
proto-pic / VoltMeter1.ino
Created May 16, 2017 14:25
Arduino Volt Meter
int myVoltageReading = 5.14;
unsigned int analogIn = 0;
void setup()
{
Serial.begin(115200);
}
void loop()
{
analogIn = analogRead(A0);
#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 );
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))
# 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
#
#
# 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 *