Skip to content

Instantly share code, notes, and snippets.

View EDISON-SCIENCE-CORNER's full-sized avatar
🏠
Working from home

RAJESH K T EDISON-SCIENCE-CORNER

🏠
Working from home
View GitHub Profile
/////////////////////////////////////////////////////////////////
// Arduino turbidity meter Project //
// //
// www.edisonsciencecorner.blogspot.com //
/////////////////////////////////////////////////////////////////
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 16);
int sensorPin = A0;
/*
Sketch generated by the Arduino IoT Cloud Thing "Untitled"
https://create.arduino.cc/cloud/things/96da2ac8-336f-496e-9206-e9c105ec58b0
Arduino IoT Cloud Variables description
The following variables are automatically generated and updated when changes are made to the Thing
bool led;
CloudTemperatureSensor temperature;
#include <Wire.h>
#include "LedControl.h"
LedControl lc=LedControl(12,10,11,4); // Pins: DIN,CLK,CS, # of Display connected
struct point
{
int y, x;
int aX, aY;
};
#include "DFRobot_DF2301Q.h"
#define whiteLed 8
#define blueLed 9
//I2C communication
DFRobot_DF2301Q_I2C asr;
void setup() {
Serial.begin(115200);
@EDISON-SCIENCE-CORNER
EDISON-SCIENCE-CORNER / arduino touch sensor plant.ino
Last active June 30, 2023 06:09
arduino touch sensing plant
// EDISON SCIENCE CORNER
// EDISON SCIENCE CORNER
// EDISON SCIENCE CORNER
// EDISON SCIENCE CORNER
// EDISON SCIENCE CORNER
// EDISON SCIENCE CORNER
#include <CapacitiveSensor.h>
/*www.edisonsciencecorner.blogspot.com*/
int ledpins[] = {2,3,4,5};
int groundpins[] = {6,7};
void setup ()
{
for(int i = 0; i < 4; i++)
{
pinMode(ledpins[i],OUTPUT);
}
//www.edisonsciencecorner.blogspot.com
//www.edisonsciencecorner.blogspot.com
//www.edisonsciencecorner.blogspot.com
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 16);
const int Up_buttonPin = 2; // the pin that the pushbutton is attached to
const int Down_buttonPin = 3;
#include <FastLED.h>
#define NUM_LEDS 2
#define DATA_PIN 6
#define CLOCK_PIN 13
CRGB leds[NUM_LEDS];
void setup() {
pinMode (3,INPUT);
pinMode (2,OUTPUT);
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}
//EDISON SCIENCE CORNER
//EDISON SCIENCE CORNER
//EDISON SCIENCE CORNER
//EDISON SCIENCE CORNER
//EDISON SCIENCE CORNER
int digit1 = 11; //PWM Display pin 12 (digit1 is common anonds A1 from right side)
int digit2 = 10; //PWM Display pin 9 (digit2 is common A2)
int digit3 = 9; //PWM Display pin 8 (digit3 is common anods A3)
int digit4 = 6; //PWM Display pin 6 (digit4 is common anods, from left side)
int segA = 2; //Display pin 11
#include <Servo.h>
Servo ESC; // create servo object to control the ESC
int potValue; // value from the analog pin
void setup() {
// Attach the ESC on pin 9
ESC.attach(9,1000,2000); // (pin, min pulse width, max pulse width in microseconds)
}
void loop() {
potValue = analogRead(A0); // reads the value of the potentiometer (value between 0 and 1023)