What Eco Money is all about

EcoMoney is a virtual currency designed to track and recognize an individual’s environmental contributions. Unlike traditional currencies, EcoMoney cannot be exchanged for goods or services. Its sole purpose is to serve as a tangible measure of one’s commitment to environmental sustainability.

So EcoMoney cannot be bought, sold, or redeemed for any other currency or goods. Users can track their total EcoMoney earned and their progress over time. By focusing on recognition and awareness rather than monetary rewards, EcoMoney can serve as a powerful tool for motivating individuals to take action and contribute to a healthier planet.

This content is password protected. To view it please enter your password below:

Hi. My name is Emmanouel and today I am going to share with you, instructions on how to build an Arduino based car using either an available toy car with two main motors (one for steering) and one for the forward/backward motion.

The other classical project is the RC tank. In this case the tank uses both left or right motors for moving and steering. If both right motors move forward and both left motors stay still or move with lower speed then the tank turns right.

In this tutorial we are going to build both a car and a tank.

List of contents

1.Build a Simple  Arduino Tank/Car 

1.1 Components and Parts

1.2 Schematics

1.3 Code

1.4 Android App

2. Step by Step Build Up

2.1 Step 1 Lights Lights and More Lights

2.2 Step 2

3. More functions (ADVANCED CAR)

Special function: Collision avoidance System

Special Function. Bluetooth dead or alive!!

Code for the advanced car version

4.  Android Application    (link for play store) 

5.  Troubleshooting

First Things First. Build a simple version first.

Ready to build your own mini car? This tutorial shows you how to assemble a simple car using a chassis, a motor controller, and Bluetooth module.

Components and Parts
  • null

    Car Chassis 4 motor

  • null

    Car Chassis 2 motor

  • null

    Arduino Uno

  • null

    Dual Motor Driver Module L298N

  • null

    HC-05 Serial Bluetooth module

  • null

    Battery Holder for 18650 Batteries

  • null

    Battery 18650 x 2

Build the car

Let’s build! Use the diagram below as your blueprint for assembling the car.

The Code!!!
//////////////////////setup Dual Motor Driver Module L298N pins  /////////////////////

#define in1 7 //Front Right
#define in2 6 //Back Right
#define en1 3 //right speed
#define in3 10   //Front Left
#define in4 11   //Back Left
#define en2 5   //Left speed

int BTcommand; //Int to store app Bluetooth command state.
int pwm_speedA = 255;  //forward speed
int pwm_speedB = 48;  //stiring speed

void setup() {

  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);  
  pinMode(en1, OUTPUT);
   
  pinMode(in3, OUTPUT);
  pinMode(in4, OUTPUT);
  pinMode(en2, OUTPUT);
  
  Serial.begin(9600);  //Set the baud rate to your Bluetooth module.
}

void loop() {

   if (Serial.available() > 0) {
      BTcommand = Serial.read();
      Stop(); //Initialize with motors stoped.
      switch (BTcommand) {
              
        case 'F':
          forward();
           break;
        case 'B':
          back();
          break;
        case 'L':
          left();
          break;
        case 'R':
          right();
          break;
        case 'G':
         forwardleft();
         break;
        case 'I':
         forwardright();
         break;
        case 'H':
         backleft();
         break;
        case 'J':
         backright();
         break;
        case '0':
         pwm_speedA = 100;
         break;
        case '1':
         pwm_speedA = 140;
         break;
        case '2':
         pwm_speedA = 153;
         break;
        case '3':
         pwm_speedA = 165;
         break;
        case '4':
         pwm_speedA = 178;
         break;
        case '5':
         pwm_speedA = 191;
         break;
        case '6':
         pwm_speedA = 204;
         break;
        case '7':
          pwm_speedA=216;
          break;
        case '8':
         pwm_speedA = 229;
         break;
        case '9':
         pwm_speedA = 242;
         break;
        case 'q':
         pwm_speedA = 255;      
         break;
      }
     }
}

void forward() {
  digitalWrite(in4, HIGH);  
  analogWrite(en2,pwm_speedA); 
    
  digitalWrite(in1, HIGH);  
  analogWrite(en1,pwm_speedA);
}

void back() {
  digitalWrite(in2, HIGH);  
  analogWrite(en1,pwm_speedA); 
  
  digitalWrite(in3, HIGH);  
  analogWrite(en2,pwm_speedA);
}

void left() {
  digitalWrite(in3, HIGH);
  analogWrite(en2,pwm_speedA);
  
  digitalWrite(in1, HIGH);
  analogWrite(en1,pwm_speedA);
}

void right() {
  digitalWrite(in2, HIGH);
  analogWrite(en1,pwm_speedA);

  digitalWrite(in4, HIGH);
  analogWrite(en2,pwm_speedA);
}

void forwardleft() {
  digitalWrite(in4, HIGH);  
  analogWrite(en2,pwm_speedB); 
  
  digitalWrite(in1, HIGH);  
  analogWrite(en1,pwm_speedA);
}

void forwardright() {
  digitalWrite(in4, HIGH);  
  analogWrite(en2,pwm_speedA); 
  
  digitalWrite(in1, HIGH);  
  analogWrite(en1,pwm_speedB);
}

void backright() {
  digitalWrite(in2, HIGH);
  analogWrite(en1,pwm_speedB);
    
  digitalWrite(in3, HIGH);
  analogWrite(en2,pwm_speedA);
}

void backleft() {
  digitalWrite(in2, HIGH);
  analogWrite(en1,pwm_speedA);
      
  digitalWrite(in3, HIGH);
  analogWrite(en2,pwm_speedB);
}

void Stop() {
  analogWrite(in1, 0);
  analogWrite(in2, 0);
  analogWrite(in3, 0);
  analogWrite(in4, 0);
}
Build the Advanced Version
  1. Lighting Control:
      • Front, back, and brake lights can be manually controlled.
      • The stop lights should be red LEDs that activate when the car is stationary.
      • Bluetooth Control: Use Bluetooth to control the lights. Send the character “W” to turn the front lights on and “w” to turn them off. Similarly, use “U” and “u” for the rear lights.
  2. Collision Avoidance:
    • An SR-04 sensor detects obstacles in front and behind the car.
    • If an obstacle is within 20cm, the car stops, an additional horn is activated and then the car reverses for 20 milliseconds.
  3. Speed Control:
    • Adjust speed manually using “HIGH,” “MEDIUM,” or “LOW” settings.
    • Fine-tune speed by adjusting a speed bar (0-9).
    • The corresponding number is sent via Bluetooth.
  4. Horn Control:
    • The horn is activated by pressing a button and deactivated by releasing it.
    • “V” is sent to activate the horn, and “v” is sent to deactivate it.
  5. Gyro Control:
    • Two gyro control modes are available:
      • Single-Axis Gyro: Turn the phone left/right to steer the car. Use app buttons for forward/backward movement.
      • Dual-Axis Gyro: Tilt the phone to control both steering and forward/backward movement.
    • Gyro control deactivates autonomous and line-following modes.
  6. Laser Pointer:
    • A laser pointer indicates the car’s direction, especially useful for camera-based driving.
  7. Automatic Lights:
    • A light sensor automatically turns lights on/off based on ambient light conditions.
    • Manual light control is disabled when auto-lights are active.
  8. Autonomous Mode:
    • The car drives autonomously, avoiding obstacles.
    • It stops, scans left and right, and turns towards the path with the most clearance.
    • Gyro, collision avoidance, and line-following modes are deactivated in autonomous mode.
  9. Line-Following Mode:
    • The car follows a black line using three sensors.
    • The middle sensor detects the line, while the side sensors correct the car’s direction.
    • Gyro and autonomous modes are deactivated in line-following mode.
  10. PS2 Controller Mode:
    • The car can be controlled using a wireless PS2 controller.
    • Switch the car to PS2 mode before turning it on.
    • To switch back to Bluetooth mode, turn the car off, switch to BT mode, and turn it back on.
  1. Custom Buttons
  •  Two more buttons named F1 and F2 are customizable, allowing users to assign them to specific functions. To rename a button, simply long-press it.
  1. Bluetooth Reliability.
    • Imagine driving your car and suddenly, the Bluetooth connection drops. This could lead to unintended consequences, especially if the car is in autonomous mode. To prevent such issues, connect the state pin of your Bluetooth module to Arduino pin 12. This pin indicates the module’s connection status.
    • The Arduino continuously reads the voltage level on pin 12. If the voltage drops, it means the Bluetooth connection is lost. Upon detecting a connection loss, the Arduino immediately stops all motors, bringing the car to a safe halt. By implementing this simple yet effective solution, you can significantly enhance the safety and reliability of your Bluetooth-controlled car.
Components and Parts
Step by Step
Step 1 Adding Lights, Lights and More Lights

Adding Front Lights, Back Lights and Stop Lights

Components and Parts

More functions

Special function: Collision avoidance System

You can install in front of the car an HC-SR04 ultrasonic sensor. In this way the sensor measures obstacles that are in the way. When the distance measured, is below 10 cm (you can adjust it) and the special key D is sent from the app (Menu -> Collision button is enabled) the car is going backwards for half a second and then it stops

SR04 pins

Echo Pin to Arduino Pin 9

Trig Pin to Arduino Pin 8The Schematics and the code for the Arduino in this case is

Troubleshooting

 1.  If the car is not going on the right direction.

If this happens and your car is not going in the right direction then you don’t have to modify any code. You have to just change the motor driver wires in pairs.

For instance swap in1 with in2 or in3 with in4 pins

2.  Cannot upload the code to the Arduino

You must know that when you are uploading the code to the Arduino. You must unplug the RX and TX pin of the Bluetooth module. Otherwise, you will not be able to upload the code to the Arduino.

3.  The car in not responding the right way or often Bluetooth disconnections.

There is not enough power supply. Please make sure that both 18650 batteries are full charged

Advanced Project Management Certification

Issued by PM² Alliance

The PM² Methodology is the official project management methodology of the EC and is currently being rapidly adopted internationally. It is a lean and easy to implement methodology suitable for any type of project as it enables project teams to manage projects effectively and deliver solutions and benefits to their organisations and stakeholders. PM² enables Project Managers to deliver solutions and benefits to their organisations through the effective management of project work. It is based on operational experience from projects run within the European Institutions, but also incorporates elements from a wide range of globally accepted project management best practices, standards and methodologies such as PMBoK Guide, PRINCE2®, IPMA-ICB.

My 7th grade Science Project

This project is about my 6th grade science project. The Arduino-based liquid temperature monitor is a versatile project designed specifically for measuring the temperature of liquids. Whether you’re a hobbyist, a science enthusiast, or a homebrewer, this project offers a fun and educational way to explore sensor interfacing and real-world applications.

Functionality

  1. Liquid Temperature Measurement:
    • The heart of this project is an Arduino microcontroller (such as the Arduino Uno or Nano) equipped with a temperature sensor DHT22 for environmental measurements and a DS18B20 as a liquid temperature sensor
    • The sensor provides accurate readings of the liquid’s temperature.
    • These measurements are crucial for various applications, including brewing, aquariums, and chemical processes.
  2. Visual Feedback:
    • The liquid temperature monitor can display the temperature using LEDs or an LCD screen.
    • For example, you can use different colored LEDs (blue for cold, green for optimal, and red for hot) to indicate the liquid’s temperature range.

Possible Uses

  1. Homebrewing and Fermentation:
    • Use the liquid temperature monitor during beer brewing, wine making, or kombucha fermentation.
    • Maintain precise temperatures for optimal yeast activity and flavor development.
  2. Aquariums and Fish Tanks:
    • Monitor the water temperature in aquariums.
    • Ensure that fish and aquatic plants thrive in the right temperature range.
  3. Chemical Reactions and Labs:
    • Use the monitor in chemistry experiments or research.
    • Monitor reaction temperatures to achieve desired outcomes.
  4. Hydroponics and Plant Growth:
    • Measure nutrient solution temperatures in hydroponic systems.
    • Adjust the temperature to promote healthy plant growth.
Components
  • null

    Arduino Uno

  • null

    Breadboard

  • null

    DHT 22 sensor

  • null

    LCD 2x16 i2c

  • null

    DS18B20 temperature sensor

  • null

    Leds x 3

  • null

    Tactile Button

  • null

    Toggle switch x 2

  • null

    Buzzer

  • null

    18650 Battery holder

  • null

    18650 Battery x 2

  • null

    Cables

Connection diagram
Flowchart
The code!

#include <Wire.h> // Library for I2C communication

#include <LiquidCrystal_I2C.h> // Library for LCD

#include <OneWire.h>

#include <DallasTemperature.h>

#include “DHT.h”

int value;

#define DHTPIN 27     // Digital pin connected to the DHT sensor

#define ONE_WIRE_BUS 14

#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321

 

int StateChangeButton;

int StateCFButton;

 

const int ChangeButton = 17; // ChangeButton pin

const int CFButton = 12; //CFButton pin

int GreenLED = 23; // green LED pin

int BlueLED = 19; // blue LED pin

int RedLED = 25; // red LED pin

int Buz=16; // Buzzer pin

 

OneWire oneWire(14);

DallasTemperature sensors(&oneWire);

 

DHT dht(DHTPIN, DHTTYPE);

LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27, 16, 2); // Change to (0x3F,16,2) for 16×2 LCD.

 

 

void setup() {

pinMode(ChangeButton, INPUT_PULLUP );

pinMode(CFButton, INPUT_PULLUP );

pinMode(GreenLED, OUTPUT); // Declare the LED as an output

pinMode(BlueLED, OUTPUT); // Declare the LED as an output

pinMode(RedLED, OUTPUT); // Declare the LED as an output

pinMode(Buz, OUTPUT); // Declare the LED as an output

 

Serial.begin(9600);

sensors.begin();

dht.begin();

 

// Initiate the LCD:

lcd.init();

lcd.backlight();

lcd.setCursor(0, 0); // Set the cursor on the first column and first row.

lcd.print(“Hello!!”); // Print the string “Hello World!”

lcd.setCursor(0, 1); // Set the cursor on the first column and first row.

lcd.print(“Mary Spiridaki”); // Print the string “Hello World!”

delay(2000);

lcd.clear();

}

 

void loop() {

// read Sensors

StateChangeButton = digitalRead(ChangeButton);  // Read ChangeButton State

 

// Read Air Thermometer

float h = dht.readHumidity();//Reading temperature or humidity takes about 250 milliseconds!

float t = dht.readTemperature(); // Read temperature as Celsius (the default)

float f = dht.readTemperature(true); // Read temperature as Fahrenheit (isFahrenheit = true)

 

// Check if any reads failed and exit early (to try again).

if (isnan(h) || isnan(t) || isnan(f)) {

Serial.println(F(“Failed to read from DHT sensor!”));

return;

}

 

// Compute heat index in Fahrenheit (the default)

float hif = dht.computeHeatIndex(f, h);

// Compute heat index in Celsius (isFahreheit = false)

float hic = dht.computeHeatIndex(t, h, false);

 

//Read Liquid Thermometer

sensors.requestTemperatures();

 

if ( digitalRead(CFButton) == HIGH ){

 

if ( StateCFButton == 0 ){

 

StateCFButton = 1;

 

}else if ( StateCFButton == 1 ){

StateCFButton = 0;

}

}

 

if ( StateChangeButton == LOW ){

 

if ( StateCFButton == 0 ){

 

 

lcd.setCursor(0, 0); // Set the cursor on the first column and first row.

lcd.print(“Air Temp:”); // Print the string “Hello World!”

lcd.print(t); // Print the string “Hello World!”

lcd.print(char(223));

lcd.print(“C”); // Print the string “Hello World!”

lcd.setCursor(0, 1); //Set the cursor on the third column and the second row (counting starts at 0!).

lcd.print(”     Hum:”);

lcd.print(h);

lcd.print(“% “);

lcd.print(” “);

 

}else if ( StateCFButton == 1 ){

 

 

lcd.setCursor(0, 0); // Set the cursor on the first column and first row.

lcd.print(“Air Temp: “); // Print the string “Hello World!”

lcd.print(f); // Print the string “Hello World!”

lcd.print(“F”); // Print the string “Hello World!”

lcd.setCursor(0, 1); //Set the cursor on the third column and the second row (counting starts at 0!).

lcd.print(”     Hum: “);

lcd.print(h);

lcd.print(“% “);

}

 

 

if (t>35 || h >80) {

digitalWrite(Buz, HIGH); // Turn the LED on

delay (2000);

} else {

digitalWrite(Buz, LOW);

}

 

if (t<22) {

digitalWrite(BlueLED, HIGH);

digitalWrite(GreenLED, LOW);

digitalWrite(RedLED, LOW);

 

} else if (t>30) {

digitalWrite(BlueLED, LOW);

digitalWrite(GreenLED, LOW);

digitalWrite(RedLED, HIGH);

}else {

digitalWrite(BlueLED, LOW);

digitalWrite(GreenLED, HIGH);

digitalWrite(RedLED, LOW);

}

 

}else {

 

 

if ( StateCFButton == 0 ){

 

lcd.setCursor(0, 0); // Set the cursor on the first column and first row.

lcd.print(“Liquid Sensor   “); // Print the string “Hello World!”

lcd.setCursor(0, 1); //Set the cursor on the third column and the second row (counting starts at 0!).

lcd.print(“Temp: “);

lcd.print(sensors.getTempCByIndex(0));

lcd.print(char(223));

lcd.print(“C”);

lcd.print(”    “);

 

}else if ( StateCFButton == 1 ){

 

lcd.setCursor(0, 0); // Set the cursor on the first column and first row.

lcd.print(“Liquid Sensor   “); // Print the string “Hello World!”

lcd.setCursor(0, 1); //Set the cursor on the third column and the second row (counting starts at 0!).

lcd.print(“Temp: “);

lcd.print(sensors.getTempFByIndex(0));

lcd.print(” “);

lcd.print(“F”);

lcd.print(”   “);

}

 

if (sensors.getTempCByIndex(0)>50) {

digitalWrite(Buz, HIGH); // Turn the LED on

delay (2000);

} else {

digitalWrite(Buz, LOW);

}

 

if (sensors.getTempCByIndex(0)<16) {

digitalWrite(BlueLED, HIGH);

digitalWrite(GreenLED, LOW);

digitalWrite(RedLED, LOW);

 

} else if (sensors.getTempCByIndex(0)>27) {

digitalWrite(BlueLED, LOW);

digitalWrite(GreenLED, LOW);

digitalWrite(RedLED, HIGH);

}else {

digitalWrite(BlueLED, LOW);

digitalWrite(GreenLED, HIGH);

digitalWrite(RedLED, LOW);

}

 

}

 

delay (400);

 

}

Future Leaders Exchange (FLEX) program WINNER

By the U.S. Department of State

What is FLEX?

1993-1994 was the first program year of the Future Leaders Exchange (FLEX) program. FLEX was created from the belief of former Senator Bill Bradley that the best way to ensure long-lasting peace and mutual understanding between the U.S. and the countries of Eurasia is to enable young people to learn about the U.S. and Americans firsthand, and to teach Americans about their countries.

 

FLEX is a highly competitive, merit-based scholarship program funded by the U.S. Department of State that operates in Armenia, Azerbaijan, the Czech Republic, Estonia, Georgia, Greece, Hungary, Kazakhstan, Kyrgyzstan, Latvia, Lithuania, Moldova, Mongolia, Montenegro, Poland, Romania, Serbia, Slovakia, Tajikistan, Turkmenistan, Ukraine, and Uzbekistan. Over 35,000 students compete annually in multiple rounds of testing to earn a FLEX scholarship, which provides for them to spend an academic year in the United States living with a volunteer host family and attending a U.S. high school.

While in the U.S., FLEX students gain leadership skills, learn about American society and values, and teach Americans about their home countries and cultures. FLEX students perform community service in their U.S. communities and act as ambassadors of their home countries. Many are inspired by this spirit of volunteerism to develop and implement innovative projects in their home countries, using the skills and ideas they gained while on program. FLEX students are naturally curious and enthusiastic citizens of the world. 

Enhancing Stair Safety with Arduino: Exploring Five Lighting Modes

Imagine a staircase that not only illuminates for safety but also offers various lighting modes to cater to different needs. The Arduino Stair Lights project does just that, using components like Arduino Nano, lasers, laser receivers, and a photoresistor. It ensures safer staircases while providing customizable lighting experiences.

How It Works:

  1. Initialization: When powered on, the Arduino gets ready and waits for signals from sensors.
  2. Detecting Movement: Lasers on one side of the staircase emit beams to the other side. If these beams are interrupted, indicating movement, the sensors pick up the change and notify the Arduino.
  3. Lighting Decision: The Arduino, considering the ambient light level sensed by the photoresistor, determines to switch on the device or not.

Exploring the Five Lighting Modes:

  1. Progressive Illumination: Each step lights up progressively as someone ascends or descends, offering a smooth and guiding effect.
  2. Individual Step Lighting: Lights under each step illuminate individually upon detection of movement, ensuring clear visibility and safety.
  3. Testing Mode: This mode is for testing purposes. All lights, lasers, and laser receivers are activated simultaneously to ensure they are functioning correctly.
  4. Step Lighting with Photoresistor: Similar to Mode 2, each step lights up individually upon movement. However, in this mode, the presence of a photoresistor enables the lasers, ensuring precise activation.
  5. Progressive Illumination with Photoresistor: Similar to Mode 1, lights illuminate progressively with movement. However, the presence of a photoresistor enables the lasers, ensuring accurate timing and activation.

Benefits of the Five Modes:

  1. Tailored Safety and Convenience: Users can choose the lighting mode that best suits their preferences and needs, ensuring optimal safety and convenience on the stairs.
  2. Versatility and Customization: Whether it’s a gradual glow or individual step lighting, the Arduino Stair Lights project offers customizable options to match various styles and preferences.
  3. Ease of Use and Installation: Despite its advanced features, the project remains user-friendly, allowing easy installation and customization for users of all skill levels.

Conclusion:

The Arduino Stair Lights project elevates stair safety and ambiance by offering a range of customizable lighting modes. From progressive illumination to individual step lighting, each mode caters to different preferences and needs. With the addition of testing and photoresistor-enabled modes, the project ensures accuracy and reliability in its functionality. So, whether you seek a gentle glow or precise step lighting, Arduino Stair Lights delivers safety and customization in every step.

Components and Parts
  • null

    Arduino nano

  • null

    KY-008 3Pin 650nm Red Laser Transmitter

    As much as the stairs

  • null

    Laser Sensor Module non-modulator Tube Laser Receiver

    As much as the receivers

  • null

    USB LED

    As much as the stairs

    You can use any other source of light

  • null

    Photoresistor Sensor Module

    As much as the stairs

    You can use any other source of light

  • null

    Breadboard

  • null

    5v Relay Module for Arduino

  • null

    2x16 LCD with I2C Module

  • null

    Tactile Push Button Switch Momentary

  • null

    10K ohm Carbon Film Resistor

  • null

    Lots of wires

  • null

    3d printed LCD case

The Code!!!
// setup lcd 16x2

#include <Wire.h> // Library for I2C communication
#include <LiquidCrystal_I2C.h> // Library for LCD
// Wiring: SDA pin is connected to A4 and SCL pin to A5.
// Connect to LCD via I2C, default address 0x27 (A0-A2 not jumpered)
LiquidCrystal_I2C lcd = LiquidCrystal_I2C(0x27, 16, 2); // Change to (0x3F,16,2) for 16x2 LCD.


// setup for average photoresistor readings
const int numReadings = 5;   // number of Photorestistor Reading to calculate average

int readings[numReadings];  // the readings from the analog input
int readIndex = 0;          // the index of the current reading
int total = 0;              // the running total
int average = 0;            // the average
int PhotoResistorPin = A7;


//The number of each led represents each stair from the bottom to the top the same logic applies to the the leds
//All led Pins
int led1 = 11;
int led2 = A2;
int led3 = A1;
int led4 = A0;
int led5 = 8;
int led6 = 13;
int led7 = 12;

//All laserReceiver Pins
int laserReceiver1 = 9;
int laserReceiver2 = 2;
int laserReceiver3 = 3;
int laserReceiver4 = 4;
int laserReceiver5 = 5;
int laserReceiver6 = 6;
int laserReceiver7 = 7;


int laser = 10;  // the pin number of the laser relay
 
const int buttonPin = A3; // the number of the pushbutton pin
int buttonState = 0;   // variable for reading the pushbutton status
int counterButton = 1;    // variable for counting how many times the buttom is pressed          
   
//Associated with blinkMode
int checkLights = 0;
int ascending = 1;  // variable for ascending (1) or descending (0) the stairs 
int checklight = 0;

void setup() {
  Serial.begin(9600);

  // Initiate the LCD:
  lcd.init();
  lcd.backlight();

 // initialize all the photoresistor readings to 0:
  for (int thisReading = 0; thisReading < numReadings; thisReading++) {
    readings[thisReading] = 0;
  }

  //All laserReceiver Input
  pinMode(laserReceiver1, INPUT);
  pinMode(laserReceiver2, INPUT);
  pinMode(laserReceiver3, INPUT);
  pinMode(laserReceiver4, INPUT);
  pinMode(laserReceiver5, INPUT);
  pinMode(laserReceiver6, INPUT);
  pinMode(laserReceiver7, INPUT);

  
  pinMode(laser, OUTPUT); // relay output
  pinMode(buttonPin, INPUT); // initialize the pushbutton pin as an input:

  //All led Output
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(led4, OUTPUT);
  pinMode(led5, OUTPUT);
  pinMode(led6, OUTPUT);
  pinMode(led7, OUTPUT);

        lcd.clear();
        lcd.setCursor(0, 0); // Set the cursor on the first column and first row.
        lcd.print("Mode 1 No Sensor"); // Print the string "Hello World!"
        lcd.setCursor(0, 1); //Set the cursor on the third column and the second row (counting starts at 0!).
        lcd.print("Progressive Mode");


}

void loop() {

  buttonState = digitalRead(buttonPin);
 
  if (buttonState == HIGH) {
     Serial.print("high ");
     counterButton = counterButton + 1;
      if (counterButton ==6 ) {
        counterButton =1;
      }

     if (counterButton ==1 ) {
        lcd.clear();
        lcd.setCursor(0, 0); // Set the cursor on the first column and first row.
        lcd.print("Mode 1 No Sensor"); 
        lcd.setCursor(0, 1); //Set the cursor on the third column and the second row (counting starts at 0!).
        lcd.print("Progressive Mode");
      }

      if (counterButton ==2 ) {
        lcd.clear();
        lcd.setCursor(0, 0); // Set the cursor on the first column and first row.
        lcd.print("Mode 2 No Sensor"); // Print the string "Hello World!"
        lcd.setCursor(0, 1); //Set the cursor on the third column and the second row (counting starts at 0!).
        lcd.print("Step Mode");
      }

      if (counterButton ==3 ) {
        lcd.clear();
        lcd.setCursor(0, 0); // Set the cursor on the first column and first row.
        lcd.print("Mode 3 Check Serial"); // Print the string "Hello World!"
        lcd.setCursor(0, 1); //Set the cursor on the third column and the second row (counting starts at 0!).
        lcd.print("Test Mode");
      }

      if (counterButton ==4 ) {
        lcd.clear();
        lcd.setCursor(0, 0); // Set the cursor on the first column and first row.
        lcd.print("Mode 4 Sensor"); // Print the string "Hello World!"
        lcd.setCursor(0, 1); //Set the cursor on the third column and the second row (counting starts at 0!).
        lcd.print("Step Mode");
      }

      if (counterButton ==5 ) {
          lcd.clear();
          lcd.setCursor(0, 0); // Set the cursor on the first column and first row.
          lcd.print("Mode 5 Sensor"); // Print the string "Hello World!"
          lcd.setCursor(0, 1); //Set the cursor on the third column and the second row (counting starts at 0!).
          lcd.print("Progressive Mode");
      }


  Serial.println(counterButton);
  delay (100);
  }

  switch (counterButton) {
  case 1:
    blinkMode();
    break;
  case 2:
    NormalMode();
    break;
  case 3:
    test();
    break;
  case 4:
    PhotoresistorNormal();
    break;
  case 5:  
    PhotoresistorBlink();
    break;
}

  delay(50);//delay is for next time 
 
  
  }

void GetAverageLight(){

   int value = analogRead(PhotoResistorPin);
    //////////////////////calculating average photoresistor readings//////////  
    // subtract the last reading:
    total = total - readings[readIndex];
    // read from the sensor:
    readings[readIndex] = analogRead(PhotoResistorPin);
    Serial.print("now reading ");
      Serial.print(readings[readIndex]);
    Serial.print(" array ");
    for(int i = 0; i < numReadings; i++)
    {
    Serial.print(readings[i]);  Serial.print(" ");
    }
      // add the reading to the total:
    total = total + readings[readIndex];
    // advance to the next position in the array:
    readIndex = readIndex + 1;

    // if we're at the end of the array...
    if (readIndex >= numReadings) {
      // ...wrap around to the beginning:
      readIndex = 0;
    }
    Serial.print(" total "); Serial.print(total);
    // calculate the average:
    average = total / numReadings;
    
    Serial.print(" average ");  Serial.println(average);
  
}

void NormalMode() {  //(Lights each led every time a stair has been activated)
  digitalWrite(laser, HIGH);
  int value1 = digitalRead(laserReceiver1);
  int value2 = digitalRead(laserReceiver2);
  int value3 = digitalRead(laserReceiver3);
  int value4 = digitalRead(laserReceiver4);
  int value5 = digitalRead(laserReceiver5);
  int value6 = digitalRead(laserReceiver6);
  int value7 = digitalRead(laserReceiver7);

  /////////////////Condition for laserReceiver1 and led1/////////////////
  if (value1 == 1) {
    digitalWrite(led1, HIGH);
  }
  if (value1 == 0) {
    digitalWrite(led1, LOW);
  }

  /////////////////Condition for laserReceiver2 and led2/////////////////
  if (value2 == 1) {
    digitalWrite(led2, HIGH);
  }
  if (value2 == 0) {
    digitalWrite(led2, LOW);
  }
  /////////////////Condition for laserReceiver3 and led3/////////////////

  if (value3 == 1) {
    digitalWrite(led3, HIGH);
  }
  if (value3 == 0) {
    digitalWrite(led3, LOW);
  }

  /////////////////Condition for laserReceiver4 and led4/////////////////
  if (value4 == 1) {
    digitalWrite(led4, HIGH);
  }
  if (value4 == 0) {
    digitalWrite(led4, LOW);
  }
  /////////////////Condition for laserReceiver5 and led5/////////////////
  if (value5 == 1) {
    digitalWrite(led5, HIGH);
  }
  if (value5 == 0) {
    digitalWrite(led5, LOW);
  }
  /////////////////Condition for laserReceiver6 and led6/////////////////
  if (value6 == 1) {
    digitalWrite(led6, HIGH);
  }
  if (value6 == 0) {
    digitalWrite(led6, LOW);
  }
  /////////////////Condition for laserReceiver7 and led7/////////////////

  if (value7 == 1) {
    digitalWrite(led7, HIGH);
  }
  if (value7 == 0) {
    digitalWrite(led7, LOW);
  }
}

void blinkMode() {  //(Lights every stair with ascending and disensic order)
  digitalWrite(laser, HIGH);
  int delay1 = 30;

  if (digitalRead(laserReceiver1) == 1 && checkLights == 0) {
    digitalWrite(led1, HIGH);
    delay(delay1);
    digitalWrite(led2, HIGH);
    delay(delay1);
    digitalWrite(led3, HIGH);
    delay(delay1);
    digitalWrite(led4, HIGH);
    delay(delay1);
    digitalWrite(led5, HIGH);
    delay(delay1);
    digitalWrite(led6, HIGH);
    delay(delay1);
    digitalWrite(led7, HIGH);
    ascending = 1;
    checkLights = 1;
  }

  if (digitalRead(laserReceiver7) == 1 && checkLights == 0) {
    digitalWrite(led7, HIGH);
    delay(delay1);
    digitalWrite(led6, HIGH);
    delay(delay1);
    digitalWrite(led5, HIGH);
    delay(delay1);
    digitalWrite(led4, HIGH);
    delay(delay1);
    digitalWrite(led3, HIGH);
    delay(delay1);
    digitalWrite(led2, HIGH);
    delay(delay1);
    digitalWrite(led1, HIGH);
    ascending = 0;
    checkLights = 1;
  }

  if (digitalRead(laserReceiver1) == 0 && digitalRead(laserReceiver2) == 0 && digitalRead(laserReceiver3) == 0 && digitalRead(laserReceiver4) == 0 && digitalRead(laserReceiver5) == 0 && digitalRead(laserReceiver6) == 0 && digitalRead(laserReceiver7) == 0 && checkLights == 1) {
    if (ascending == 1) {
      digitalWrite(led1, LOW);
      delay(delay1);
      digitalWrite(led2, LOW);
      delay(delay1);
      digitalWrite(led3, LOW);
      delay(delay1);
      digitalWrite(led4, LOW);
      delay(delay1);
      digitalWrite(led5, LOW);
      delay(delay1);
      digitalWrite(led6, LOW);
      delay(delay1);
      digitalWrite(led7, LOW);
      checkLights = 0;
    }

    else if (ascending == 0) {
      digitalWrite(led7, LOW);
      delay(delay1);
      digitalWrite(led6, LOW);
      delay(delay1);
      digitalWrite(led5, LOW);
      delay(delay1);
      digitalWrite(led4, LOW);
      delay(delay1);
      digitalWrite(led3, LOW);
      delay(delay1);
      digitalWrite(led2, LOW);
      delay(delay1);
      digitalWrite(led1, LOW);
      checkLights = 0;
    }
  }
}

void PhotoresistorNormal() {  //(Lights each led every time a stair has been activated)


  GetAverageLight();
  Serial.print("checklight ");  Serial.print(checklight);Serial.print(" ");
  if (average < 700) {
    digitalWrite(laser, LOW);
    digitalWrite(led1, LOW);
    digitalWrite(led2, LOW);
    digitalWrite(led3, LOW);
    digitalWrite(led4, LOW);
    digitalWrite(led5, LOW);
    digitalWrite(led6, LOW);
    digitalWrite(led7, LOW);
    checklight = 0;



  } else if (average > 900) {
    NormalMode();
   
  }
}

void PhotoresistorBlink() {  //(Lights each led every time a stair has been activated)

  int value = analogRead(PhotoResistorPin);
   GetAverageLight();
  Serial.print("checklight ");  Serial.print(checklight);Serial.print(" ");
  if (average < 700) {
    digitalWrite(laser, LOW);
    digitalWrite(led1, LOW);
    digitalWrite(led2, LOW);
    digitalWrite(led3, LOW);
    digitalWrite(led4, LOW);
    digitalWrite(led5, LOW);
    digitalWrite(led6, LOW);
    digitalWrite(led7, LOW);
    checklight = 0;
    }

    else if (average > 900) {
    blinkMode();
    }
}

void test() {     // test mode
  digitalWrite(laser, HIGH);
  int value1 = digitalRead(laserReceiver1);
  int value2 = digitalRead(laserReceiver2);
  int value3 = digitalRead(laserReceiver3);
  int value4 = digitalRead(laserReceiver4);
  int value5 = digitalRead(laserReceiver5);
  int value6 = digitalRead(laserReceiver6);
  int value7 = digitalRead(laserReceiver7);

  
  int value = analogRead(PhotoResistorPin);

  Serial.print("LIGHT ");
  Serial.print(value);
  Serial.print(" sensors ");
  Serial.print(value1);
  Serial.print(value2);
  Serial.print(value3);
  Serial.print(value4);
  Serial.print(value5);
  Serial.print(value6);
  Serial.print(value7);
  Serial.print(" ");

     GetAverageLight();

    /////////////////Condition for laserReceiver1 and led1/////////////////
    if (value1 == 1) {
      digitalWrite(led1, LOW);
    }
    if (value1 == 0) {
      digitalWrite(led1, HIGH);
    }

    /////////////////Condition for laserReceiver2 and led2/////////////////
    if (value2 == 1) {
      digitalWrite(led2, LOW);
    }
    if (value2 == 0) {
      digitalWrite(led2, HIGH);
    }
    /////////////////Condition for laserReceiver3 and led3/////////////////

    if (value3 == 1) {
      digitalWrite(led3, LOW);
    }
    if (value3 == 0) {
      digitalWrite(led3, HIGH);
    }

    /////////////////Condition for laserReceiver4 and led4/////////////////
    if (value4 == 1) {
      digitalWrite(led4, LOW);
    }
    if (value4 == 0) {
      digitalWrite(led4, HIGH);
    }
    /////////////////Condition for laserReceiver5 and led5/////////////////
    if (value5 == 1) {
      digitalWrite(led5, LOW);
    }
    if (value5 == 0) {
      digitalWrite(led5, HIGH);
    }
    /////////////////Condition for laserReceiver6 and led6/////////////////
    if (value6 == 1) {
      digitalWrite(led6, LOW);
    }
    if (value6 == 0) {
      digitalWrite(led6, HIGH);
    }
    /////////////////Condition for laserReceiver7 and led7/////////////////

    if (value7 == 1) {
      digitalWrite(led7, LOW);
    }
    if (value7 == 0) {
      digitalWrite(led7, HIGH);
    }

    delay(20);
}
Construction

This project was made for  7 stairs so you have to adjust if you have more stair by using more Arduino nano or get an Arduino mega which has more pinouts

Use the below images to see how I use the Arduino nano. The code is adjusted to these diagrams

Cable management

Concerning cable management I designed in fusion 360 the above channels used for hiding the cables used for lighting and sensors.

3d model

Download Files
Photos

Certificate of Proficiency in English

ECPE

The Examination for the Certificate of Proficiency in English (ECPE) has been certifying learners at an advanced level since 1953. Popular in Europe and Latin America, the ECPE tests all four language skills and is aimed at the C2 level of the Common European Framework of Reference for Languages (CEFR).

ECPE

ECCE

The Examination for the Certificate of Competency in English (ECCE) has been certifying learners at a high-intermediate level since 1993. Popular in Europe and Latin America, the ECCE tests all four language skills and is aimed at the B2 level of the Common European Framework of Reference for Languages (CEFR).

ECCE

ECCE AWARD

ECCE AWARD

Astronomy Certification

The are 3 courses, Our Solar System – The Universe and Galaxies – New astronomical theories and discoveries

The PURPOSE of the Astronomy School through distance learning (OnLine) is the gradual introduction of students to the amazing and always interesting knowledge of Astronomy, through which their minds are expanded, their cognitive horizons are broadened, their thinking is liberated, and they gain a broader understanding of the surrounding world, which gradually extends into the cosmos and the very Creation of the Universe. In the Astronomy School through distance learning (OnLine), children learn to look up high, to gaze at the stars, to envision, to dream, and to acquire significant ethical and spiritual skills and abilities that strengthen their character and broaden their interests. They thus establish an ideal and higher purpose in their lives.

A Class

B Class

C Class

Arduino Certification

Issued by Arduino ®

Arduino Certification is an online exam that provides official certification on your knowledge of Arduino related electronics, programming and physical computing.

The official Arduino certificate is a document that affirms your successful completion of the Arduino exam, and serves as a guarantee of your competence in the Arduino-related subjects. It could be used to highlight your skills and learning progress, and to advance in your career or education.

Arduino certificates use a unique QR code system which allows to instantly check their validity online, making them impossible to forge or copy.