Project #15: Environment – Crowtail Rotary Angle Sensor – Mk23
——
#DonLucElectronics #DonLuc #Arduino #ASM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant
——
——
——
——
Crowtail – Rotary Angle Sensor 2.0
This rotary angle sensor may also be known as potentiometer that produces analog output between 0 and 3.3-5 Volt. The angular range is 300 degrees with a linear change in value. The resistance value is 10k ohms, perfect for Arduino use. Some applications like smart light control, volume control, only you can not think of things, no impossible things.
DL2501Mk04
1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – Rotary Angle Sensor 2.0
1 x Crowtail – Moisture Sensor 2.0
1 x Crowtail – I2C LCD
1 x Crowtail – LED(Green)
1 x Crowtail – LED(Yellow)
1 x USB Battery Pack
1 x USB Mini-B Cable
Crowduino Uno – SD
SCL – A5
SDA – A4
POT – A1
ASM – A0
LEDY – 7
LEDG – 6
VIN – +5V
GND – GND
DL2501Mk04p
DL2501Mk04p.ino
/****** Don Luc Electronics © ****** Software Version Information Project #15: Environment – Crowtail Rotary Angle Sensor – Mk23 DL2501Mk04p.ino DL2501Mk04 1 x Crowduino Uno - SD 1 x Crowtail - Base Shield 1 x Crowtail - Rotary Angle Sensor 2.0 1 x Crowtail - Moisture Sensor 2.0 1 x Crowtail - I2C LCD 1 x Crowtail - LED(Green) 1 x Crowtail - LED(Yellow) 1 x USB Battery Pack 1 x USB Mini-B Cable */ // Include the Library Code // Wire #include <Wire.h> // Liquid Crystal #include "LiquidCrystal.h" // Potentiometer int iPotentiometer = A1; // Change Your Threshold Here int Threshold = 0; int zz = 0; // Liquid Crystal // Connect via i2c LiquidCrystal lcd(0); // Crowtail Moisture Sensor int iSoilMoisture = A0; int iSoilMoistureVal = 0; // LED Yellow int iLEDYellow = 7; // LED Green int iLEDGreen = 6; // Software Version Information String sver = "15-23"; void loop() { // Crowtail Moisture Sensor isSoilMoisture(); // Delay 1 Second delay( 1000 ); }
getDisplay.ino
// getDisplay // Crowbits - OLED 128X64 UID void isDisplayUID(){ // Set up the LCD's number of rows and columns: lcd.begin(16, 2); // Print a message to the LCD. // Cursor lcd.setCursor(0, 0); lcd.print("Don Luc Electron"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD. lcd.print( sver ); } // isDisplay Green void isDisplayG(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Humid Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); } // isDisplay Yellow void isDisplayY(){ // Print a message to the LCD // Clear lcd.clear(); // Cursor lcd.setCursor(0, 0); lcd.print("Dry Soil"); // Cursor lcd.setCursor(0, 1); // Print a message to the LCD lcd.print( iSoilMoistureVal ); }
getSoilMoisture.ino
// Crowtail Moisture Sensor // Soil Moisture void isSoilMoisture(){ // Connect Soil Moisture Sensor to Analog 0 // iSoilMoistureVal => 0~700 Soil Moisture iSoilMoistureVal = analogRead( iSoilMoisture ); // Threshold => 200~500 zz = analogRead( iPotentiometer ); Threshold = map( zz, 0, 1024, 200, 500); // Threshold if (iSoilMoistureVal > Threshold) { // 300~700 - Humid Soil // LED Yellow digitalWrite(iLEDYellow, LOW); // Display Green isDisplayG(); // LED Green digitalWrite(iLEDGreen, HIGH); } else { // 0-300 Dry Soil // LED Green digitalWrite(iLEDGreen, LOW); // Display Yellow isDisplayY(); digitalWrite(iLEDYellow, HIGH); } }
setup.ino
// Setup void setup() { // Delay delay(100); // Initialize the LED iLED Yellow pinMode(iLEDYellow, OUTPUT); // Initialize the LED LED Green pinMode(iLEDGreen, OUTPUT); // Display UID isDisplayUID(); // Delay 5 Second delay( 5000 ); }
——
People can contact us: https://www.donluc.com/?page_id=1927
Electronics, IoT, Teacher, Instructor, R&D and Consulting
- Programming Language
- Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
- IoT
- Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
- Robotics
- Automation
- Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
- Unmanned Vehicles Terrestrial and Marine
- Machine Learning
- Artificial Intelligence (AI)
- RTOS
- Sensors, eHealth Sensors, Biosensor, and Biometric
- Research & Development (R & D)
- Consulting
Follow Us
Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/
Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/
Leave a Reply