This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int Trig = 2; //pin 2 Arduino połączony z pinem Trigger czujnika | |
int Echo = 3; //pin 3 Arduino połączony z pinem Echo czujnika | |
int red = 8; // podłaczenie diody R=8, G=10, B=9, V=GND | |
// podłączenie termometru OUT=3, +=5V, -=GND | |
int green = 10; | |
int blue = 9; | |
int CM; //odległość w cm | |
long CZAS; //długość powrotnego impulsu w uS | |
void setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
#define TRIG 4 | |
#define ECHO 5 | |
LiquidCrystal_I2C lcd(0x3f,2,16); | |
void setup() | |
{ | |
pinMode(TRIG,OUTPUT); |