16x2 LCD Display (Liquid Crystal library) OSEPP Uno Revision 3 Plus Board UltraSonic range finder 7.2v 200 mA Solar Panel.

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.


  1. /*Demonstrates the use of:
  2.  * 16x2 LCD Display (LiquidCrystal library)
  3.  * OSEPP Uno Revision 3 Plus Board
  4.  * UltraSonic range finder
  5.  * 7.2v 200mA Solar Panel
  6.  *
  7.  * Using vibrations seen from our UltraSonic range finder
  8.  * we first map our distance from the target to aquire
  9.  * a more accurate reading of vibrations to map the
  10.  * key strokes of the target laptop or touchpad.
  11.  *
  12.  * Each key stroke can be defined uniquely by vibration wave lengths
  13.  * we know the space will have the biggest vibration wave length so
  14.  * we now have a guaranteed method to know how many characters equals
  15.  * the word with enough key strokes we can learn and convert
  16.  * vibrations into key strokes.
  17.  */
  18.  
  19.  
  20. // include the library
  21. #include <LiquidCrystal.h>
  22.  
  23. // all of our LCD pins
  24. int echoPin = 6;   //blue
  25. int trigPin = 7;   //green
  26. int lcdRSPin = 12;
  27. int lcdEPin = 11;
  28. int lcdD4Pin = 5;
  29. int lcdD5Pin = 4;
  30. int lcdD6Pin = 3;
  31. int lcdD7Pin = 2;
  32.  
  33. // initialize the library with the numbers of the interface pins
  34. LiquidCrystal lcd(lcdRSPin, lcdEPin,
  35.                   lcdD4Pin, lcdD5Pin, lcdD6Pin, lcdD7Pin);
  36.  
  37. void setup()
  38. {
  39.     // set up the LCD's number of columns and rows:
  40.     lcd.begin(16, 2);
  41.  
  42.     // set the pinmode on out ultrasonic echo, and trig pins
  43.     pinMode(echoPin, INPUT);
  44.     pinMode(trigPin, OUTPUT);
  45.  
  46.     // print our sL logo to lcd
  47.     lcd.print("Scorpion Labs");
  48. }
  49.  
  50. void loop()
  51. {
  52.     // set the cursor to column 0, line 1
  53.     lcd.setCursor(0, 1);
  54.  
  55.     // print the number of seconds since reset
  56.     //lcd.print(millis() / 1000);
  57.  
  58.     float distanceCentimeters;
  59.     int pulseLenMicroseconds;
  60.  
  61.     // bit-bang a small square wave
  62.     // on the trig pin to start the range
  63.     digitalWrite(trigPin, LOW);
  64.     delayMicroseconds(20);
  65.     digitalWrite(trigPin, HIGH);
  66.     delayMicroseconds(100);
  67.     digitalWrite(trigPin, LOW);
  68.  
  69.     // measure the pulse length from the echo pin
  70.     pulseLenMicroseconds = pulseIn(echoPin, HIGH);
  71.  
  72.     // calculate the distance using the speed of sound
  73.     distanceCentimeters = pulseLenMicroseconds / 29.387 / 2;
  74.  
  75.     lcd.print(distanceCentimeters);
  76.  
  77.     delay(100);
  78. }


Learn More :