SHARE
TWEET

Untitled

a guest Jan 28th, 2020 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //const byte sensor1 = 0x10; //TFMini I2C Address
  2. //#include <Wire.h>
  3. //uint16_t distance = 0; //distance
  4. //uint16_t strength = 0; //signal strength
  5. //uint8_t rangeType = 5; //range scale
  6.  
  7.  
  8. boolean valid_data = false; //ignore invalid ranging data
  9. char mystr[5]; //Initialized variable to store recieved data
  10.  
  11. void setup() {
  12.   // Begin the Serial at 9600 Baud
  13.   Serial.begin(115200);
  14. }
  15.  
  16. void loop() {
  17.   Serial.readBytes(mystr,5); //Read the serial data and store in var
  18.   Serial.println(mystr); //Print data on Serial Monitor
  19.   delay(01);
  20. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top