Next we tried to make a prototype as a group. Firstly, we set out what we wanted to achieve for that period of time and what resources we would need for it.


We looked at a simple code to see if we could adjust it to create a good prototype. All the codes needed a RTC (real time clock) to work so we worked on a more simple code to get the second effect that we wanted. It was way more challenging then the previous coding exercises as there was more content which made it way easier to make mistakes with the code. Along the way we got the neopixels to change colours every second as seen in the hyperlink below:
The next thing was to get the Neopixels to have no colour and then flash with the seconds. Michaela was able to hack a code for this which is pasted below
// NeoPixel Ring simple sketch (c) 2013 Shae Erisson
// released under the GPLv3 license to match the rest of the AdaFruit NeoPixel library
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
// Which pin on the Arduino is connected to the NeoPixels?
// On a Trinket or Gemma we suggest changing this to 1
#define PIN 6
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 3
// When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals.
// Note that for older NeoPixel strips you might need to change the third parameter--see the strandtest
// example for more information on possible values.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
int delayval = 1000; // delay for half a second
void setup() {
// This is for Trinket 5V 16MHz, you can remove these three lines if you are not using a Trinket
#if defined (__AVR_ATtiny85__)
if (F_CPU == 16000000) clock_prescale_set(clock_div_1);
#endif
// End of trinket special code
pixels.setBrightness(21);
pixels.begin(); // This initializes the NeoPixel library.
}
void loop() {
// For a set of NeoPixels the first NeoPixel is 0, second is 1, all the way up to the count of pixels minus one.
for(int i=0;i<NUMPIXELS;i++){
// pixels.Color takes RGB values, from 0,0,0 up to 255,255,255
pixels.setPixelColor(i, pixels.Color(255,255,204)); // Moderately bright green color.
pixels.show();
delay(delayval); // Delay for a period of time (in milliseconds).
pixels.setPixelColor(i, pixels.Color(0,0,0)); //
pixels.show(); // This sends the updated pixel color to the hardware.
}}
The example video for this code is hyperlinked below also:
https://drive.google.com/file/d/1UYAp4wGtdYKo36RcR-9QYBp7Bg8sT8jI/view?usp=sharing
Next we need to purchase the RTC and get a code working with that.