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 <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x3F, 16, 2); | |
void setup() | |
{ | |
lcd.init(); | |
lcd.backlight(); | |
lcd.setCursor(0,0); |
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
import RPi.GPIO as GPIO | |
import time | |
s2 = 23 | |
s3 = 24 | |
signal = 25 | |
NUM_CYCLES = 10 |
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 <SPI.h> | |
#include <Wire.h> | |
#include <Adafruit_GFX.h> | |
#include <Adafruit_SSD1306.h> | |
#define SCREEN_WIDTH 128 | |
#define SCREEN_HEIGHT 64 | |
#define OLED_MOSI 13 | |
#define OLED_CLK 14 |
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
const int watermeterPin = 2; | |
volatile int pulse_frequency; | |
unsigned int literperhour; | |
unsigned long currentTime, loopTime; | |
byte sensorInterrupt = 0; | |
void setup() | |
{ | |
pinMode(watermeterPin, INPUT); |
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<reg51.h> | |
#define led P0 | |
sbit sw1=P2^0; | |
sbit sw2=P2^1; | |
sbit sw3=P2^2; | |
sbit sw4=P2^3; | |
unsigned char ch[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; | |
//void delay (int); | |
void display (unsigned long int); | |
void sdelay (char); |
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 rec=2; | |
int play=3; | |
int sensor=4; | |
int led=13; | |
void setup() | |
{ | |
pinMode(rec,OUTPUT); | |
pinMode(play,OUTPUT); | |
pinMode(led,OUTPUT); |
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<reg51.h> | |
#define lcd P3 | |
#define dat P2 | |
sbit rs=P1^6; | |
sbit e=P1^7; | |
void delay (int); | |
void display (unsigned char); | |
void cmd (unsigned char); |
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 Lane1[] = {13,12,11}; // Lane 1 Red, Yellow and Green | |
int Lane2[] = {10,9,8};// Lane 2 Red, Yellow and Green | |
int Lane3[] = {7,6,5};// Lane 3 Red, Yellow and Green | |
int Lane4[] = {4,3,2};// Lane 4 Red, Yellow and Green | |
void setup() | |
{ | |
for (int i = 0; i < 3; i++) | |
{ | |
pinMode(Lane1[i], OUTPUT); |
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 <Wire.h> | |
#include <LiquidCrystal.h> | |
#include "RTClib.h" | |
DateTime now; | |
char daysOfTheWeek[7][12] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; | |
RTC_DS3231 rtc; | |
LiquidCrystal lcd(7, 6, 5, 4, 3, 2); // (rs, e, d4, d5, d6, d7) |
NewerOlder