This list was developed for an 8 year old with intermediate tech skills in mind.
This file contains hidden or 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
let letter = "" | |
let timerCounter = 0 | |
//Creates a shake gesture that will display a new letter | |
input.onGesture(Gesture.Shake, () => { | |
if (timerCounter < 63) { | |
//Uncomment one of the below depending on what letters you want added to the microbit | |
letter = "AEIOUY".charAt(Math.random(6)) | |
//letter = "BCDFGHJKLMNPQRSTVWXZ".charAt(Math.random(18)) | |
//letter = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.random(25)) |
This file contains hidden or 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
import java.util.*; | |
public class Bills { | |
public static void main(String[] args) { | |
double johnBills=0; | |
double janeBills=0; | |
Scanner console = new Scanner(System.in); | |
System.out.print("How much will John be spending? "); | |
johnBills = getBills(); |
This file contains hidden or 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 <ESP8266WiFi.h> | |
#include <Adafruit_MQTT.h> | |
#include <Adafruit_MQTT_Client.h> | |
#include "DHT.h" | |
#define DHTPIN 14 // what digital pin we're connected to | |
#define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321 | |
DHT dht(DHTPIN, DHTTYPE); | |
/************************* WiFi Access Point *********************************/ |
This file contains hidden or 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 ledPin=9; //Variable to store pin of LED | |
int photoPin=A0; //Variable to store pin of potentiometer | |
int photoValue=0; //Variable to store last known value of potentiometer | |
int brightnessValue=0; //Variable to store LED brightness | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(ledPin, OUTPUT); //Setup LED pin for output | |
} |
This file contains hidden or 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
//This is a basic program to report the value of a photoresistor to the Adafruit.io service. | |
//These libraries are needed to talk to the Internet and the Adafruit service | |
#include <YunClient.h> | |
#include <Adafruit_MQTT.h> | |
#include <Adafruit_MQTT_Client.h> | |
int photoPin=A0; //Variable to store pin of photoresistor | |
float photoValue=0; //Variable to store last known value of photoresistor |
This file contains hidden or 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 <YunClient.h> | |
#include <Adafruit_MQTT.h> | |
#include <Adafruit_MQTT_Client.h> | |
int ledPin = 9; | |
/************************* Adafruit.io Setup *********************************/ | |
#define AIO_SERVER "io.adafruit.com" | |
#define AIO_SERVERPORT 1883 |
This file contains hidden or 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 <Process.h> | |
int ledPin=9; //Variable to store pin of LED | |
int potentPin=A0; //Variable to store pin of potentiometer | |
int potentValue=0; //Variable to store last known value of potentiometer | |
int brightnessValue=0; //Variable to store LED brightness | |
int moistPin=A1; //Variable to store pin of moisture sensor | |
int moistValue=0; //Variable to store moisture value | |
///////////////// |
This file contains hidden or 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 <Process.h> //Library for Sparkfun network connection | |
///////////////////////////////// | |
// Data.SparkFun.Com variables // | |
//////////////////////////////// | |
// URL to phant server (only change if you're not using data.sparkfun | |
String phantURL = "http://data.sparkfun.com/input/"; | |
// Public key (the one you see in the URL): | |
String publicKey = "xxxxxx"; | |
// Private key, which only someone posting to the stream knows |
This file contains hidden or 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 <Process.h> | |
int ledPin=9; //Variable to store pin of LED | |
int potentPin=A0; //Variable to store pin of potentiometer | |
int potentValue=0; //Variable to store last known value of potentiometer | |
int brightnessValue=0; //Variable to store LED brightness | |
///////////////// | |
// Phant Stuff // | |
///////////////// |
NewerOlder