This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned int analogIn = 0; | |
void setup() | |
{ | |
Serial.begin(115200); | |
} | |
void loop() | |
{ | |
for (int loopy = 0; loopy < 10; loopy++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int myVoltageReading = 5.14; | |
unsigned int analogIn = 0; | |
void setup() | |
{ | |
Serial.begin(115200); | |
} | |
void loop() | |
{ | |
analogIn = analogRead(A0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int myVoltageReading = 5.14; | |
unsigned int analogIn = 0; | |
void setup() | |
{ | |
Serial.begin(115200); | |
} | |
void loop() | |
{ | |
analogIn = analogRead(A0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 ); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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 * |