Posts

Showing posts from January, 2024

The Code of Revolution: Reclaiming Humanity in a Digital Age

                                  The Code of Revolution: Reclaiming Humanity in a Digital Age Once upon a time, in a not-too-distant future, there lived a young girl named Ava. In this technologically advanced world, robots and artificial intelligence had became an integral part of everyday life. Ava was a brilliant and curious girl who had a special connection with machines, thanks to her exceptional aptitude for coding. Ava had two supportive friends: Charlie, a charismatic boy known for his engineering skills, and Zoe, a gifted artist who brought life to Ava's digital creations. Together, they formed an unstoppable trio, exploring the wonders of the technologically-driven society they inhabited. The year was 2045, a time when virtual reality had become a ubiquitous presence. People would escape to immersive virtual landscapes, leaving the real world behind. While some found solace in this digital re...

Microphone sensor

Image
The Hardware required: -Arduino Board -Bread Board -Microphone sensor -Wire -USB Cable  Firstly connect the three wires from microphone sensor to bread board and fourth wire to A0.  Then connect the three single wires, Red wire from Bread board to 5V, Black wire from Bread board to GND and Green wire from Bread board to another GND. The Code : //Parameters const int micPin  = AO; //Variables int micVal   = O; // the setup routine runs once when you press reset: // initialize serial communication at 9600 bits per second: void setup() {   //Init Serial USB   Serial.begin(9600);   Serial.println(F("Initialize System"));   //Init Microphone   pinMode(micPin, INPUT); } void loop() {   readMicrophone(); } void readMicrophone( ) { /* function readMicrophone */   ////Test routine for Microphone   micVal = analogRead(micPin);   Serial.print(F("mic val ")); Serial.println(micVal);   if (micVal > 600) {     Serial.p...

Servo Motors

Image
Servo motors is a motor which rotates in a specific angle.  In Arduino, the hardware required are: -Arduino Board -Bread Board -USB Cable -Wires -Servo motors First connect Red wire of servo motor with another red wire to 5V,  Brown wire of servo motor with Black wire to GND and Yellow wire of servo motor with white wire to -9V of Arduino board. Then the code used is sweep: #include <Servo.h> Servo myservo;  // create servo object to control a servo // twelve servo objects can be created on most boards int pos = 0;    // variable to store the servo position void setup() {   myservo.attach(9);  // attaches the servo on pin 9 to the servo object } void loop() {   for (pos = 0; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees     // in steps of 1 degree     myservo.write(pos);              // tell servo to go to position in variable 'pos'     delay(15);   ...

LED Lights

Image
 The hardware required are: -Arduino Board -Bread Board -LED -USB Cable -10k ohm Resistor -220 ohm Resistor -The led light with basic code Firstly connect the three wires:  Red wire from bread board to 5V, Black wire from bread board to Ground GND and White wire from bread board to Analog input A0. Also, insert the LED light in GND and 13V. Then from the basic code AnalogReadSerial: // the setup routine runs once when you press reset: void setup() {      pinMode(LED_BUILTIN, OUTPUT);   // initialize serial communication at 9600 bits per second:   Serial.begin(9600); } // the loop routine runs over and over again forever: void loop() {   // read the input on analog pin 0:   int sensorValue = analogRead(A0);   // print out the value you read:   Serial.println(sensorValue);   delay(1);  // delay in between reads for stability     digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level) ...