Smart Planter

Smart Planter

Description

I made this project for my small carnivorous plant and it has a small space to put some soil. To make this, you need some : x1 arduino nano x1 capasitive soil sensor x1 80*160 display (you can modify it for all screen types) Aeduino code⬇️⬇️ int sclk = 13; int mosi = 11; int cs = 10; int dc = 9; int rst = 8; #include <SPI.h> #include <Adafruit_GFX.h> // graphics library #include <Adafruit_ST7735.h> // hardware library Adafruit_ST7735 tft = Adafruit_ST7735 (cs, dc, rst); #define nem A0 #define WHITE 0xFFFF #define BLACK 0x0000 #define BLUE 0xF800 #define BRED 0XF81F #define GRED 0XFFE0 #define GBLUE 0X07FF #define RED 0x001F #define MAGENTA 0xF81F #define GREEN 0x07E0 #define CYAN 0x7FFF #define YELLOW 0xFFE0 #define BROWN 0XBC40 #define BRRED 0XFC07 #define GRAY 0X8430 void setup() { Serial.begin (9600); tft.initR(); Serial.println ("TFT connected"); } void loop() { int deger=analogRead(nem); tft.setRotation(3); //Making screen horizontal tft.fillScreen (WHITE); //Screen color tft.setTextColor( 0XF51F); ////Text color tft.setTextSize(6); // Text size tft.setCursor (4 , 45); //Text place tft.print (deger); // Text delay(1000); }

Statistics

Likes

0

Downloads

1