C Program to Demonstrates the use of: 16x2 LCD Display (Liquid Crystal library) OSEPP Uno Revision 3 Plus Board UltraSonic range finder 7.2v 200 mA Solar Panel.
Using vibrations seen from our Ultra Sonic range finder we first map our distance from the target to aquire a more accurate reading of vibrations to map the key strokes of the target laptop or touch pad.
Each key stroke can be defined uniquely by vibration wave lengths we know the space will have the biggest vibration wave length so we now have a guaranteed method to know how many characters equals the word with enough key strokes we can learn and convert vibrations into key strokes.
- /*Demonstrates the use of:
- * 16x2 LCD Display (LiquidCrystal library)
- * OSEPP Uno Revision 3 Plus Board
- * UltraSonic range finder
- * 7.2v 200mA Solar Panel
- *
- * Using vibrations seen from our UltraSonic range finder
- * we first map our distance from the target to aquire
- * a more accurate reading of vibrations to map the
- * key strokes of the target laptop or touchpad.
- *
- * Each key stroke can be defined uniquely by vibration wave lengths
- * we know the space will have the biggest vibration wave length so
- * we now have a guaranteed method to know how many characters equals
- * the word with enough key strokes we can learn and convert
- * vibrations into key strokes.
- */
- // include the library
- #include <LiquidCrystal.h>
- // all of our LCD pins
- int echoPin = 6; //blue
- int trigPin = 7; //green
- int lcdRSPin = 12;
- int lcdEPin = 11;
- int lcdD4Pin = 5;
- int lcdD5Pin = 4;
- int lcdD6Pin = 3;
- int lcdD7Pin = 2;
- // initialize the library with the numbers of the interface pins
- LiquidCrystal lcd(lcdRSPin, lcdEPin,
- lcdD4Pin, lcdD5Pin, lcdD6Pin, lcdD7Pin);
- void setup()
- {
- // set up the LCD's number of columns and rows:
- lcd.begin(16, 2);
- // set the pinmode on out ultrasonic echo, and trig pins
- pinMode(echoPin, INPUT);
- pinMode(trigPin, OUTPUT);
- // print our sL logo to lcd
- lcd.print("Scorpion Labs");
- }
- void loop()
- {
- // set the cursor to column 0, line 1
- lcd.setCursor(0, 1);
- // print the number of seconds since reset
- //lcd.print(millis() / 1000);
- float distanceCentimeters;
- int pulseLenMicroseconds;
- // bit-bang a small square wave
- // on the trig pin to start the range
- digitalWrite(trigPin, LOW);
- delayMicroseconds(20);
- digitalWrite(trigPin, HIGH);
- delayMicroseconds(100);
- digitalWrite(trigPin, LOW);
- // measure the pulse length from the echo pin
- pulseLenMicroseconds = pulseIn(echoPin, HIGH);
- // calculate the distance using the speed of sound
- distanceCentimeters = pulseLenMicroseconds / 29.387 / 2;
- lcd.print(distanceCentimeters);
- delay(100);
- }