Late in the evening Jugaadu with his younger sister were making some activity together for art and crafts. Jugaadu noticed that the measuring scale was broken and they did not have any other scale. It was already late night and therefore no stationery shop could be opened. Jugaadu decided to make something that unbreakable. So Jugaadu decides to make such scale, let us learn from Jugaadu about such type of scale?
Bag Items:
"
#include
#include
#include
int trig =10;
int echo =9;
int MAX_DISTANCE=200;
NewPing sonar(trig, echo, MAX_DISTANCE);
int CLK=8;
int DIO=7;
int TEST_DELAY =500;
TM1637Display display(CLK, DIO);
void setup() {
Serial.begin(9600);
}
void loop() {
display.setBrightness(0x0f);
uint8_t data[] = { 0x0, 0x0, 0x0, 0x0 };
display.setSegments(data);
int distance = sonar.ping_cm();
Serial.print("Ping: ");
Serial.print(sonar.ping_cm());
Serial.println("cm");
display.showNumberDec(distance, false, 3,1);
delay(50);
}