Skip to content

Instantly share code, notes, and snippets.

#include "LiquidCrystal.h"
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
float voltage = 0.0;
float temp=0.0;
int analog_value;
void setup()
{
#include "LiquidCrystal.h"
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
float voltage = 0.0;
float temp=0.0;
int analog_value;
void setup()
{
#include <LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
int count = 0;
char singleChar;
String readMsg;
void setup()
{
Serial.begin(9600);
lcd.begin(16,2);
const int buttonPin = 12;
const int transistorPin = 7;
int buttonState = 0;
void setup()
{
pinMode(buttonPin, INPUT_PULLUP);
pinMode transistorPin, OUTPUT);
#include <LiquidCrystal.h>
LiquidCrystal lcd(2, 3, 4, 5, 6, 7);
const int pulsePin = 8; // Input signal connected to Pin 8 of Arduino
int pulseHigh; // Integer variable to capture High time of the incoming pulse
int pulseLow; // Integer variable to capture Low time of the incoming pulse
float pulseTotal; // Float variable to capture Total time of the incoming pulse
float frequency; // Calculated Frequency
#include <SoftwareSerial.h>
const int rxPin = 4;
const int txPin = 2;
SoftwareSerial mySerial(rxPin, txPin);
const int Loads[] = {9, 10, 11, 12};
int state = 0;
#include <VirtualWire.h>
void setup()
{
Serial.begin(9600);
Serial.println("Ready");
vw_setup(2000);
vw_rx_start();
}
#include <VirtualWire.h>
#include <stdlib.h>
int timeOUT = 5000;
int threshold = 600;
int sensorPin = A0;
int sensorValue = 0;
int temp;
char sensorData[4];
@elktros
elktros / gist:724f79542507483458c0fc8354bce935
Created December 27, 2016 12:33
Blinking LEDs Using ARM 7 (LPC2148)
#include<lpc214x.h>
void delay (int);
void delay (int i)
{
T0TCR=0x02;
T0TCR=0x01;
while (T0TC < i);
T0TCR=0x00;
@elktros
elktros / gist:12930cea4d7b60b2d411f888026e4534
Created December 27, 2016 12:36
DC Motor Control Using ARM7 (LPC2148)
#include<lpc214x.h>
#define MOTOR (1<<18) | (1<<19)
#define BUTTON (1<<16)
int main()
{
unsigned char i=0;
PINSEL0 = 0x00000000;