Posts

Image
Kit Task 1 - Blinking LED   Code:    int ledPin = 12; void setup()  {   pinMode( ledPin , OUTPUT);      // Set pin 12 to output } void loop()  {   digitalWrite( ledPin , HIGH);   // Turn on the LED   delay( 1000 );              // Wait for 1 second   digitalWrite( ledPin , LOW);    // Turn off the LED   delay( 500 );              // Wait for 500ms } Changed LED pinout, so only the breadboard LED blinks. Made a single integer variable for the LED pin to reduce repeating code. Changed the delays so the LED stays on for twice as long as it is off.  Kit Task 2 - Potentiometer Code :  int ledPin = 12; int potPosition;       //this variable will hold a value based on the position of the potentiometer void setup() {   Serial.begin(9600);       //start a serial connection with the computer   pinMode( ledPin , OUTPUT);      //set pin 12 as an output that can be set to HIGH or LOW } void loop() {   //read the position of the pot   potPosition = anal

Sensor Project - Reverse Proximity Sensor

Image
Display installed and powered by vehicle My sensor project makes use of the HC-SR04 ultrasonic distance sensor, an Arduino Uno, Arduino Nano and a 16x2 LCD display. The purpose of this project is to provide distance data to the driver when reversing and also warn them when they're getting dangerously close to an object with a series of different tones from the buzzer and a warning to stop on display.  The Arduino Nano is dedicated to reading from the sensor and calculating the distance before sending it over a serial link to the Arduino Uno. The Uno is dedicated to controlling the display, buzzer and changing the bar graph. The original plan was to run multiple sensors from the Nano, however the sensors I ordered from AliExpress didn't arrive in time for testing but there is still plenty of room for expandability. The display shows the distance reading as reported by the Arduino Nano, along with a basic bar graph with range between  140cm and 20cm. After 20cm it displa

LED Project - Das Blinkenlights

Image
Aesthetic view of my breadboard. My project features a total of 12 individually addressable LEDs, two buttons and 12 resistors to protect the LEDs from over-current. My project runs two simple 'for' loops that increment between pins 2 and 13, the loops will turn on one LED, turn it off again and then repeat with the next LED addressed by the next pin, this gives an illusion of the light bouncing up and down on the breadboard. The buttons come into play by adjusting the delay between turning an LED on or off by 20 millisecond increments. The red button (pin A1) will add 20ms to the delay, slowing down the light cycle and the green button (pin A0) will remove 20ms from the delay, with a minimum of 20ms as not to stop the cycle altogether.   Top down view of my project. Fritzing Breadboard View Fritzing Schematic View    Demonstration video Code used in project https://henry.otago.online/files/LEDProject1/LEDProject1.ino Reflection! Q: Whe

Task 4 - Atmel Microprocessor Research

Image
The name of the chip on my arduino board is the Atmel ATmega328P Datasheet: http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-42735-8-bit-AVR-Microcontroller-ATmega328-328P_Datasheet.pdf