Skip to content

Instantly share code, notes, and snippets.

View p1nesap's full-sized avatar

Paul Mollomo p1nesap

View GitHub Profile
//Follow Project Paul on YouTube: https://www.youtube.com/c/frugalteq
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
int carry = 10;
int sum2 = 9;
int sum1 = 8;
int sum2val = 0;
int sum1val = 0;
@p1nesap
p1nesap / half_adder.ino
Created January 19, 2017 20:23
i2c Arduino display output from 4093 IC half-adder NAND
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
int carry = 2;
int sum = 5;
int carval = 0;
int sumval = 0;
@p1nesap
p1nesap / receive.ino
Created April 8, 2016 14:50
VirtualWire 433 mhZ Receive LCD Message
// Copyright (C) 2008 Mike McCauley
//with additional sections for LCD by P1nesap on Youtube: https://youtu.be/Q2iECOsfCqA
#include <VirtualWire.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); // Set the LCD I2C address
@p1nesap
p1nesap / transmit.ino
Created April 8, 2016 14:47
VirtualWire 433 mhZ RF Transmit Message to LCD
//Code by Mike McCauley ([email protected]) Copyright (C) 2008 Mike McCauley
//with LCD sections by P1nesap on YouTube: https://youtu.be/Q2iECOsfCqA
#include <VirtualWire.h>
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
void setup()
{
Serial.begin(9600); // Debugging only
Serial.println("setup");
@p1nesap
p1nesap / JSLocalStorage.html
Created February 21, 2016 20:10
Fun with JavaScript LocalStorage, Form and Images
<head>
<style>
body {
background-color: #fffafa;
color: #162252;
font-family: arial;
font-size: 16px;
margin: 15px 15px 25px 25px;
}
</style>
@p1nesap
p1nesap / MoodApp.py
Last active February 21, 2016 20:12
Python form with conditionals.
#!/usr/bin/env python
import cgi
import time
import datetime
import re
import cgitb; #cgitb.enable()
print "Content-type: text/html"
print
today = datetime.date.today()
@p1nesap
p1nesap / triggerYouTubeAPI.gs
Last active February 21, 2016 20:13
Time trigger function for YouTube API
//calls createDoc function from YouTubeAPI.gs and updates every 6 hours.
function createTimeDrivenTriggers() {
ScriptApp.newTrigger('createDoc')
.timeBased()
.everyHours(6)
.create();
}
@p1nesap
p1nesap / YouTubeAPI.gs
Last active February 21, 2016 20:14
Google YouTube API display real-time channel subscribers, view count
function createDoc() {
var doc = DocumentApp.getActiveDocument();
var body = doc.getBody();
//Put your unique API key in UNIQUE_KEY section below
var url = "https://www.googleapis.com/youtube/v3/channels?id=UNIQUE_KEY&part=statistics&fields=items(statistics(viewCount, subscriberCount))";
var response = UrlFetchApp.fetch(url);
var astext = response.getContentText();
//var nobrak = astext.replace(/[\])}[{(]/g, '');
//var strip = astext.replace(/[\(\)\[\]{},'"]/g,"").replace("items:", "").replace("statistics:", "").replace("viewCount", "Total Views").replace("subscriberCount", "Subscribers");
@p1nesap
p1nesap / analog-rf.ino
Created January 9, 2016 00:20
Arduino Analog RF Receiver Voltage Data LCD 315 433MHz
/*
Code by Tom Igoe with voltage/LCD sections by p1nesap. Watch on YouTube:
https://www.youtube.com/watch?v=MlS9Arac9jM
*/
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
@p1nesap
p1nesap / DHT11_LCD_I2C_Messages.ino
Last active September 28, 2018 18:32
DHT 11 temperature/humidity sensor, 16-character 2-line LCD screen with message relating to weather conditions, processed by Uno R3 microcontroller.
/* DHT 11 temperature/humidity sensor, 16-character 2-line LCD screen with message relating to weather conditions,
processed by Uno R3 microcontroller.
Watch related video on my YouTube channel, and post comment. Thanks!
http://youtube.com/user/p1nesap
Sensor out to pin 2. SCL to A5, SDA to A4.
1st i2c_scan, put address # in LiquidCrystal_I2C below.
*/
#include <Wire.h> // communicate with sensors