LSNHS
HOME
About
LASAL History
PTA Officers
Faculty Club Officers
Supreme Student Government
School Profile
Contact
SCHOOL ACTIVITIES
COMPETITIONS
INNOVATIONS
APPs
Events
Learning Materials
Grade 7
Grade 8
Grade 9
Grade 10
Grade 11
Grade 12
CSS
>
Client PC
>
Windows !0 Installation
Windows 10 (Client System ) Configuration
>
Rename Client System (Windows 10)
Formatting Partition
Firewall Configuration
Server
>
Windows Server 2012 Installation Guide
Windows Server 2012 Configuration
>
Firewall Configuration
Rename Server
Assigning IP Address
Add roles and features
>
Active Directory Domain Services
DNS
Router Configuration
>
Class A IP address - RG-EW1200
Class B IP address - TL-WR841N
AP Configuration
TASK and Schedule
Tools / Solution
ROUTER AND AP
Quarter 1
Quarter 2
Quarter 3
Programming .Net
>
Quarter 1
Quarter 2
Quarter 3
>
Lesson 1
Lesson 2
Lesson 3
Quarter 4
>
Lesson 1
JAVA Programming
>
Quarter 1
Quarter 2
Quarter 3
Quarter 4
>
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Final Activity
Lesson Demo
Reading literacy 2024
Numeracy DEAR Project 2024
Numeracy DEAR Project 2024_Set3
Project DEAR Set 4 Numeracy
Safe Browser
NLCA - BICOL
SSLG Election 2024
SSLG GUIDE
Quarter 4 - Lesson 4
The Smart Toy Car
Learning Guide
The Circuit A
The Circuit B
Exercise 1 - Infrared sensor
code for circuit A
adding capability to our toy car using infrared, to make it smarter, the motor will stop when the car got to the end of edge , stopping the to car to fall.
#define LS A0 // D7 left sensor
#define IN1 14 // L298N in1 motors LEFT GPIO4(D2)
#define IN2 0 // L298N in2 motors LEFT GPIO5(D1)
#define IN3 4 // L298N in3 motors RIGTH GPIO14(D5)
#define IN4 5 // L298N in4 motors RIGTH GPIO12(D6)
#include <ESP8266WiFi.h>
void forward()
{
digitalWrite(IN1, LOW);
digitalWrite(IN2, HIGH);// ALWAYS HIGH
digitalWrite(IN3, LOW);
digitalWrite(IN4, HIGH);
}
void stopm()
{
digitalWrite(IN1, HIGH);
digitalWrite(IN2,HIGH);
digitalWrite(IN3,HIGH);
digitalWrite(IN4, HIGH);
}
void setup()
{
pinMode(IN1 , OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
WiFi.mode(WIFI_OFF); //turn off WIFI
stopm();
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, LOW);
pinMode(LS, INPUT);
}
void
loop
()
{
// put your main code here, to run repeatedly:
forward
()
;
if
(
analogRead
(
LS
)
<
200
){
// one light
forward
()
;
}
else
{
stopm
()
;
}
}
}
Activity 1 - adjust the sensitivity of the sensor to get the desire behavior
Up load the code
HOME
About
LASAL History
PTA Officers
Faculty Club Officers
Supreme Student Government
School Profile
Contact
SCHOOL ACTIVITIES
COMPETITIONS
INNOVATIONS
APPs
Events
Learning Materials
Grade 7
Grade 8
Grade 9
Grade 10
Grade 11
Grade 12
CSS
>
Client PC
>
Windows !0 Installation
Windows 10 (Client System ) Configuration
>
Rename Client System (Windows 10)
Formatting Partition
Firewall Configuration
Server
>
Windows Server 2012 Installation Guide
Windows Server 2012 Configuration
>
Firewall Configuration
Rename Server
Assigning IP Address
Add roles and features
>
Active Directory Domain Services
DNS
Router Configuration
>
Class A IP address - RG-EW1200
Class B IP address - TL-WR841N
AP Configuration
TASK and Schedule
Tools / Solution
ROUTER AND AP
Quarter 1
Quarter 2
Quarter 3
Programming .Net
>
Quarter 1
Quarter 2
Quarter 3
>
Lesson 1
Lesson 2
Lesson 3
Quarter 4
>
Lesson 1
JAVA Programming
>
Quarter 1
Quarter 2
Quarter 3
Quarter 4
>
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Final Activity
Lesson Demo
Reading literacy 2024
Numeracy DEAR Project 2024
Numeracy DEAR Project 2024_Set3
Project DEAR Set 4 Numeracy
Safe Browser
NLCA - BICOL
SSLG Election 2024
SSLG GUIDE