Skip to content

Instantly share code, notes, and snippets.

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
}
#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 *********************************/
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();
@shawngrimes
shawngrimes / Microbit.js
Created July 19, 2018 13:39
Tri-Word Game Microbit game code from MEC Bootcamp 2018 created by Kathy Lane and Shawn Grimes as a prototype activity.
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))
@shawngrimes
shawngrimes / README.md
Last active March 23, 2020 17:21
STEM Toy Recommendations