Group 6:User-interactive Theatrical Props, Iron Man Mask

Why was this project chosen?

Initially, our group decided on this project because we are all fans of superhero movies. We all decided on Iron man’s helmet, because it has the most advanced technological features. There is a vast market for superhero merchandises and outfits, our mask in the future can be developed and presented to the film studios as a business idea where it can be released to the public to be sold as a movie prop.

Design Blog and Project Development

We created sketches on how the helmet would look, there were changes in our decisions about if the prop should be wearable or for display purposes, this pushed us as a group to search the market in heavier matters to find out if which one would make the helmet more luxurious/expensive. After our research, we came into conclusion that props for display only sells for higher prices because they look professional, which is also a better business strategy for our prop in the future. Research on the Iron Man design was made and hand drawn. 

After we decided on a design idea we started researching materials and ideas on how to assemble the mask. A major milestone for us was hooking up the arduino and the mask. We decided the mask to have 2 abilities, the first one is to rotate the mask inside the display platform up and down and the other one is to add LEDs in both eyes of the mask to make it look like it turns on.

When the actual building process was distributed roles for everyone, Engin doing the coding and how the whole systems would work together with the mask, Idrees working on the mask design and building together with Israel also hooking up the arduino on the mask. There was miscommunication during the building decisions at times because Engin had personal reasons he had to go back for his family in Turkey. However we overcame everything and everyone did their part of the group perfectly. Once we overcame this milestone the building of the mask started.


These 2 photos are from the very beginning of the design process where we assembled the basic design aspects of the mask and the display platform. Also a few tries on hooking up the Arduino.

After building the basic design aspects we moved on to creating the systematic part of our design where we added springs to work with servo and make adjustments to the platform. Also we added clear acrylic for the eyes.

Then added arduino, servo, LEDs, painted the whole mask with spray paint. We had errors like the servo getting broken, making the breadboard layout and the code wrong. 

Here are two videos for the testing of our product:


We were able to finish the design early by following our action plan, which will be provided in the Project Task Lists section of this document.

Project Task List

            As a group, we started the project development by creating an action plan which would help us to achieve our final product at the right time. Here is the task distribution between the group members:

Engin: Project time and plan managing, design research, developing the code for the prop, sketches and design documentation.

Idrees: Project design planning and building the physical prop, design research, sketches and major designs, documentation.

Israel: Building the physical prop, preparing the presentation ppt, design research, documentation, building design aspects.

Maker Manual

These are the final products images and videos (videos will be sent through via Email because CIO site is down) The Iron Man Helmet is a future professional movie prop. It is made for display purposes but has two functions, when holding down the button on the Arduino, the Eyes of the mask light up to red, the second function is when the second button is pressed in arduino the mask rotates 180 degrees vertically. 

Materials:

  • 3mm MDF
  • 6mm MDF
  • Springs
  • Servo
  • Wires
  • 5mm red LED’s
  • 3mm clear Acrylic
  • Screws

Tools:

  • Scroll saw
  • Disc sander
  • Sand paper
  • Glue gun
  • Matte black spray paint
  • Solder Iron
  • Pencil
  • 30cm ruler
  • Masking tape
TaskTools requiredHealth and Safety
1Drew each piece for the faceplate onto the 3mm MDF using a pencil and ruler.PencilRulerN/A
2I cut each of these pieces using a scroll saw.Scroll sawWear goggles and and apron.Keep fingers a safe distance from the blade while maintaining stability.
3Using a disc sander, I adjusted the table to the necessary angle and sanded the specified sides to the correct angle.DIsc sanderWear goggles and and apron.Keep fingers a safe distance from the blade while maintaining stability.
4Sanded all pieces down to remove any imperfections using sand paper.Sand paperN/A
5Glued the faceplate together using a hot glue gunGlue gunDo not touch hot glue.
6Drew the eye pieces onto the clear acrylic and cut these out using a scroll saw.PencilRulerScroll sawWear goggles and and apron.Keep fingers a safe distance from the blade while maintaining stability.
7Sanded the clear acrylic under running water with the sand paper to create a misty effect for the eyes, and glued them onto the faceplate using a glue gun.Sand paperHot glue gunDo not touch hot glue.
8Drew and cut out the pieces for the rest of the helmet using a scroll saw, and sanded down any necessary angles using the disc sander.PencilRulerScroll sawDisc sanderWear goggles and and apron.Keep fingers a safe distance from the blade while maintaining stability.
9Glued the servo onto the helmet, ensuring the rod between the servo and faceplate was secured to both components.Glue gunDo not touch hot glue.
10Secured screws into the faceplate and helmet using a screwdriver, and attached springs between both parts.ScrewdriverN/A
11Used masking tape to cover up the acrylic eyes, servo, and springs before sanding down the MDF and then spray painting everything using matte black spray paint.Masking tapeSand paperMatte black spray paintEnsure spray painting is only done in a well ventilated area.
12Using a solder iron, I soldered extra wires onto the LED’s and Servo so they can reach the breadboard of the arduino uno board.Solder IronEnsure soldering is done in well ventilated conditions.Wear goggles and an apron.Do not touch hot solder iron when it is on.
13Attach LED’s to the faceplate using masking tape, and finally attach all wiring to the arduino uno breadboard.Masking tapeN/A

Testing:

TestOutcomeSolution
Tested the servo working with the faceplate using example servo code.Faceplate was too heavy for the servo to pull up.Added springs to reduce work done by servo and create a smooth function.
Tested the end product using our final code.LED’s worked perfectly.Servo worked perfectly for the first 3 tests, then malfunctioned, resulting in the servo being damaged.There was no available immediate solution, however one adjustment to our design would be to work on making every component easily replaceable, in case of any malfunctions or damage.

The Breadboard Layout

The Code

 #include <Servo.h>;

 // pushbutton pins

const int buttonPin = 9; // servobutton pin 

const int buttonPin2 = 2; // ledbutton pin

int buttonState = 0; 

int buttonState2 = 0;

int buttonState3 = 0;

 //led pins

const int LED1 = 13; //ledpin1

const int LED2 = 12; //ledpin2

 // servo pin

const int servoPin = 4; //servo pin

Servo servo; //int servo

/// input and outputs

int counter = 0;

void setup()

{

  servo.attach (servoPin);// Initialising that the servo is attached

pinMode(LED1,OUTPUT); //LEDs as output

pinMode(LED2,OUTPUT); 

pinMode(buttonPin2,INPUT);// LED Buttons to work as an input

 pinMode(buttonPin, INPUT); // Servo button to work as an input

}

void loop()

{

///////////////////////// servo code

  buttonState = digitalRead(buttonPin);// reading the

  if (buttonState == LOW) 

  {

    counter++;

    delay(150); //delaying the movement 

  }

  if(counter == 0)

    servo.write (0);  // starts at zero degrees

  else if(counter == 1)

    servo.write(100); // turns to 100 degrees

  else

   counter = 0;// back to the beginning if pressed again

//////////////////////////////////// LED code 

buttonState2 = (digitalRead(buttonPin2));

if (buttonState2 == HIGH) 

{

    digitalWrite(LED1, HIGH);

  } 

  else{

    digitalWrite(LED1, LOW);

  }

 buttonState3 = digitalRead(buttonPin2);

  if (buttonState3 == HIGH)

  {

    digitalWrite(LED2, HIGH);

  } 

  else{

    digitalWrite(LED2, LOW);

}

Rain Loving Umbrellas

 

Created by:

Ishana Rhea Ramtohul

Adza Tarka

Sofia Gervasoni

Nikolai Langguth

 

Project Brief: Rain Loving Umbrellas

An umbrella in your rack sack or bag is a necessity when you are living in the UK. Conventional and common umbrellas have one purpose of either sheltering you from the rain or protecting you from burning sunrays (not really an issue while living here!). Can you bring umbrellas to life by letting them light in different patterns through LEDs responding to rain drops? You can use pressure sensors to sense raindrops and light up the specific LEDs cluster. Or maybe you can use less expensive solutions understanding that water has high dielectric constant and hence resistance, which means it can change the voltage potential in a circuit such as our hand changing the flow of current in any electronic circuit.

 

Overview: 

Climate in the UK is unpredictable, it could start pouring at any time in the day. Rainy and gloomy days can be depressing. This product is specifically designed to improve such experiences. Our interactive umbrella is connected to multiple LEDs which react to rain. If it is drizzling, it will create a ‘glowing’ effect by lighting up some LEDs. More LEDs are triggered depending on the rain intensity by using rain sensors that are attached to the umbrella. 

An on/off button is also present if the user doesn’t want any effect and just have a normal umbrella.

(Additional buttons will also be present to change the colour of the LEDs depending on the personal choice of the user.) YES or NO??

 

FEATURES:

  • Windproof and lightweight
  • Equipped with LED Light for increased visibility
  • Futuristic design
  • Different light effects depending on rain
  • Different LED colours available
  • Safe in the rain on a dark night

SPECIFICATIONS:

  • Control: On/Off Button
  • 3 Buttons for colour warm white , white , magenta
  • Lighting mode: Gentle – Moderate – Full intensity flashing
  • Battery: 1 x AA 9V battery
  • Rib Number: 8
  • Length: Approx. 80cm
  • Unfold Diameter: Approx. 90-100cm

 

Purpose: 

The reason behind designing an interactive umbrella is to create a fun and enjoyable experience for people that hate the rainy season. It can solve issues related to weather depression by lighting up their mood with our multiple LEDs.

 

Target audience: 

Our main point of interest is Londoners as this city is known for its unpredictable weather and rainy days. However it can be suitable for any person living in such cities.

 

Market research: 

Before finalising the design and functionalities of our object, we conducted a brief market research to understand what it already has to offer and analyzed a few existing electronic and interactive umbrellas. 

Here are a few examples:

 

  1. Florabellahttps://learn.adafruit.com/florabrella
  2. Stellahttps://www.instructables.com/id/Pressure-Activated-Light-Up-Umbrella/

 

TASK LIST:

  1. Brainstorming – all
  2. Research – all
  3. product main idea – all
  4. Concept + Sketches – Sofia
  5. Order Components – Rhea
  6. Storyboard – Sofia
  7. Low-fi prototype – Nikolai
  8. Pseudo code – Adza, Rhea
  9. Test components – Adza
  10. Code – Adza, Rhea, Sofia
  11. Assemble components – all
  12. High-fi prototype – Nikolai
  13. Final touch ups – all
  14. Testing and Debugging – Adza , Rhea
  15. Maker Manual – Nikolai , Sofia
  16. Pictures , videos – Sofia
  17. Meeting Notes – Adza
  18. Design Blog – Nikolai + all
  19. Presentation – all

GANTT CHART

The gantt chart helped us to :

-Visualize linked tasks, due dates and dependencies.

-The amount of time it takes to finish specific tasks.

-And who is assigned to each part of the project.

 

 

 

Day 4, Testing the Code

In this meeting as well as during day 5, we focused on finalizing, troubleshooting, testing, and improving our code. We had to focus on several main issues that were challenging to work out in our code. The most challenging was the process of getting the correct colors to switch after a player input their turn. In Othello, when a player places a tile, they switch any of the tiles that they have captured from their opponent, which can happen in any direction as long as it is bounded by two tiles of the player’s color.

In our code, we had to determine the best way to check every direction around a chosen cell to ensure that:

  1. it was adjacent to a tile of the opposite color
  2. in the direction of the tile of the opposite color, there was a tile of its own color

When these conditions were met, the code would then backtrack along that direction and switch the opponent’s tiles in that series to capture them for the player who made the turn. One particular challenge for this process was figuring out the logic required to check in the diagonal directions around each placed tile. In a section of the code for switching tiles, shown below, it shows how we worked through this challenge. For a given selection, we checked along the diagonal direction (up and right). First, if it found an empty cell, it would stop checking that direction, otherwise if it found one of its own color, then it would go backwards along that direction, switching the tiles to the player’s color.

diagonal-code

Once we had the code working for each player’s turn, we implemented a counter to check if the board had been filled, which would denote the end of the game at which point the board would display which player had won the game. Additionally, we added some aesthetic features such as a startup animation which would play each time the game began.

Day 5, Building the Board

Today we continued finishing the physical components of the board game. First we attached the neopixels onto a sheet of cardboard so they were secured into the correctly sized grid. We wanted to make the finished product look presentable, and resemble a traditional board game which players would be familiar with.we folded the cardboard over the top of the neopixels, and cut a hole the size of the board and attached a game surface to cover the board.

Next, we printed out an 8×8 grid with the same spacing as the lights on the neopixels which made it more clear which lights corresponded to each space on the board. Attaching this over the top of the board of LEDs also dispersed the light slightly so they shined evenly and were not too bright. We then sealed the pieces of cardboard together so it made a coherent game board, but allowed us to still access the neopixels if need be.

img_4286img_2296img_2297

Day 3 meeting- group 4

Today in lab we finally got the Neopixels so we got right to work soldering them. We accidentally soldered each Neopixel the wrong way so when they were plugged in none of them worked. We thought the Neopixels didn’t work or there was a problem with the Arduino. After some investigation we figured out we had soldered the wrong end and we fixed the problem by resoldering the other end. Next we got to building the circuit for the two potentiometers, button and the Neopixels. We then started experimenting with the code. We had written some basic setup code before we showed up on that day to try and scroll through the potentiometers. After some minor bug fixings we were able to get the code mostly working for scrolling horizontally and vertically with the two potentiometers.

Here are two pictures of the working neopixels and the circuit:

img_2251 img_4997

Day Two Lab

In the second day of lab we talked through prototyping ideas, outlined code and ordered materials. We started with talking through how we wanted the board to look and how to maneuver through it. Some options were force sensors or buttons on each tile or two potentiometers one for vertical and the other for horizontal navigation paired with a button to place a tile. We decided to go with the potentiometer option as there is limited inputs in the Arduino. Next we decided to use an 8 by 8 grid of neopixels for the board itself. We then started researching the code. Pretty quickly we realized we needed a special library to work with the neopixels. We tried multiple ones out and found one that would allow the entire board to be one large matrix so we stuck with that one. Next, we talked about the basic outline of the code. Some challenges we knew we were going to run into was the flipping of the board pieces especially in the diagonal direction and having the piece that was in play switch colors depending on who’s turn it was. Finally, we went through and added the neopixels to the order form so we could begin to create the board.

Here are some pictures of our initial coding outline:

img_2207img_2208

 

 

 

 

 

Day one

Today we prototyped how to make our game Othello! We started by writing out a rough plan as to how the game will operate. We brainstormed different styles of making the boardgame to compare how we would want the game to be played, and what would be the best way to construct the game. One option which we discussed was making a board with physical pieces that the players would place down on the board. They could have sensors to show which player they belonged to, and activate LEDs to light up to the corresponding colors. This would be much more intensive on the components it would require and more complex to create. A second option we thought about would be to have a grid of LEDs and the players would use a controller with two potentiometers and a button to navigate the board and input their choices. If we continued with this second design, in a later iteration of the game it could be expanded to allow for remote play so that two players could have boards in separate locations and send the moves they make to each other.

We constructed two very low fidelity prototypes to represent how the game could be constructed. We sketched the game as an 8×8 grid with each box representing a neopixel. In one prototype, the little clear tiles represented the game pieces which could be placed on the board and activate the LEDs underneath. In the second prototype, it showed how the LEDs could be covered with a semi transparent covering so that they would not be visible, but they would shine through to look more visibly appealing.

 

img_2139 img_2141 img_2140

Group 5: Dance Your Cares Away

 whatsapp-image-2018-12-14-at-22-54-22

https://docs.google.com/document/d/17KURx8dIBfWgsiJA62ZitXqxUBwUmI5AgYjPVC-x3Hs/edit?usp=sharing

Maker Manual

Meeting #1,

Planning Session: 20th November

Making a tasks list and Gantt chart for the future meetings and important deadlines set for ourselves. Assigning research to each member for the next meeting, making a list of possible components needed to make the order process smoother.

Tasks and meetings:

  • Updating the design blog
  • Gantt chart
  • Project task list
  • Research on sensors
    • Flex
    • Accelerometer
    • Tilt
    • Data inputted and used
  • Research on coding required and existing projects
    • Sway beads on kabokant.com
  • Research on Adafruit Flora
  • Meeting to discuss findings and finalise the project
    • Drawing/sketch
    • Materials list
    • Design the finalised bra
  • Email to order materials
  • Low-fi prototype 1A
    • Arduino board, sensors interaction with LEDs
    • Pseudocode
    • Test code
  • Low-fi prototype 1B
    • Attach LEDs and sensors to bra and test on Arduino
  • Redesign and sew bra based on prototype 1B
  • Low-fi prototype 2
    • Flora board, sensors interaction with LED strip
    • Display different patterns
    • Pseudocode
    • Test code
  • Final prototyping phase
    • Coding Flora
    • Put together Flora and bra
  • Final working prototype
  • Maker Manual
    • Overview section with pictures/video and description of the final product
    • Tools and supplies section with details of elements required to be made
    • Layout and circuit diagram section
    • Building section, making the physical aspects of the project
    • Code section with comments and sketches
    • Discussion of testing conducted and known shortcomings
  • Online Portfolio

Possible materials to order:

  • Flora Adafruit
  • Fabric for leotard
  • Fabric for bra
  • Flex sensors/fabric
  • Beads
  • RGB LEDs/LED strip
  • Conductive thread/wire

gantt-chart


Meeting #2,

Brainstorming Session: 21st November

Discussing the research that was made beforehand to fully comprehend the spectrum of our project. Deciding on the project idea and its execution. Sketching the bodysuit and bra, finding the right sensors and interactions to match the movement and music. The project includes a dance bodysuit with knitted flex sensors on it to detect movement, then the bra would have a microphone at the back to detect the music’s beat. LED strips and LEDs would then be added on the bodysuit and bra. The movements would affect the LEDs’ pattern, the brightness and the colour of the LEDs flashing. The microphone, on the other hand, would determine the speed of the animation through the tempo of the music.

whatsapp-image-2018-11-21-at-5-01-11-pm-1


Meeting #3,

Low-fi Prototype 1A: 25th November

Wiring fabric containing knitted flex sensor to the circuit to test the output on the Serial Monitor. Several tests and attempts including: lighting up LEDs to find thresholds, calibrating the fabric in the code, trying to stretch the fabric and inspect the values on the Serial Monitor. The flex sensor proved very temperamental to work with, making the results quite unreliable.

whatsapp-image-2018-11-27-at-12-18-52-pm


Meeting #4,

Low-fi Prototype 1B: 27th November

Twisting the legs of LEDs to make a hook that can be sewn on the bra using wires and conductive thread. Calibrating the flex sensor for accuracy and a reliable answer with a threshold, changing the code in order to get an input on the Serial Monitor.


Meeting #5,

Low-fi Prototype 1B: 2nd December

After receiving the sound module, sketches were made to test the detection of sound and the beat of the music. The sound module, unfortunately, cannot detect the beat, just the presence of sound. Different attempts were made with Arduino to check for sound detection and increase sensitivity and threshold to test.

whatsapp-image-2018-12-11-at-12-20-55whatsapp-image-2018-12-11-at-12-20-55-1


Meeting #6,

Final Project: 4th December

Preparing the RGB LEDs, white LEDs, wires and coding the final prototype. These elements are essential and need preparation before sewing. The LEDs legs were twisted to be sewn after differentiating anode and cathode. Wires were colour-coded, cut and placed in advance on the bra.


Meeting #7,

Final Project: 9th December

Sewing LEDs on the bra and white LEDs in columns to act as strips on the mesh bodysuit. Preparing resistors to be sewn.  As a substitute for the LED strips, 20 LEDs were wired in a column on the bodysuit, 10 on each side and 6 shift registers were placed in between for easy wiring of the LED bra and the strips.


Meeting #8,

Final Project: 10th December

Preparation of the 330 Ohms and 560 Ohms for the RGB LEDs and white ones. Coding and figuring the number, grouping and the placement of the shift registers. Wiring everything together, and testing it. The conductive thread was very unreliable for a constant connection, use of wires in between LEDs by hooking them to LEDs and resistors. The connection was not always reliable which cause the LEDs to not always light up or required someone pushing on the fabric to force the wires to touch each other. The LEDs on the bra were grouped by 5 to give us 30 LEDs, this mapped out to give a star effect all over it. This also includes the attribution of LEDs to the registers.

whatsapp-image-2018-12-10-at-15-56-34whatsapp-image-2018-12-10-at-16-10-42

whatsapp-image-2018-12-11-at-12-20-50


Code

//declare pinsU
int serialIn = 0;
int registerClk = 1;
int serialClk = 12;
int serialClr = 9;

int scrollVal = 0;
int turnPin = A10;

//boob groups
int groupBrightness = 10;       //blinking tempo for fading effect
int groupOn = 0;                //the group that will be on

int leftLine[10] = {19, 20, 21, 22, 23, 24, 25, 26, 27, 28};  
//holds the position of each LED
int rightLine[10] = {29, 30, 31, 32, 33, 34, 35, 36, 37, 38}; 
//as above

//loop and tempo related declarations
int current = 295; //number count down
int rounds = 1;
int tempo; //delay after each round

//colour related variables
int c = 0; 
//variable for storing at which point in the colours array to show.
int colours[] = {1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1}; 
//array to store the pattern for the colours
//stores rgb colours
//1 for on
//0 for off

void setup() {
  //setting the mode of the pins
  pinMode(serialIn, OUTPUT);
  pinMode(registerClk, OUTPUT);
  pinMode(serialClk, OUTPUT);
  pinMode(serialClr, OUTPUT);

  //setting the initial pin values
  digitalWrite(serialIn, LOW);
  digitalWrite(registerClk, LOW);
  digitalWrite(serialClk, LOW);
  digitalWrite(serialClr, LOW);

  //clearing out the registers
  digitalWrite(registerClk, HIGH);
  digitalWrite(registerClk, LOW);
  digitalWrite(serialClr, HIGH);
  Serial.begin(9600);
}

//contains everything that happens in a single moment,
// determined by the delay
void loop() {
  digitalWrite(registerClk, LOW);         //resets the clock
  scrollVal = analogRead(turnPin);
  Serial.println(scrollVal);
  int tempo = map(scrollVal, 0, 1023, 10, 500);

  //fade in/out moment, dependant on group of LEDs
  int remainder = current % groupBrightness;
  char fade = 0;                        //0 is fade in , 1 is fade out
  Serial.println(current);
  Serial.println(remainder);
  if (remainder == 0) {
    callmLED(groupOn);
    Serial.println(groupOn);
    Serial.println("done here");
    if (fade == 0) {
      rounds++;                         //adding rounds
      if (rounds == 5) {
        //below swaps fade to fade out
        groupBrightness --;
        if (groupBrightness == 0) {
          fade = 1;
        }
      }
    } else if (fade == 1) {
      rounds--;                         //subtracting rounds
      if (rounds == 0) {
        //below swaps fade to fade in/out
        groupBrightness ++;
        if (groupBrightness == 10) {
          fade = 0;
          Serial.println(fade);
          //groupOn ++;
        }
      }
    }
  } else {
    groupOFF();
  }
  callSingleLED(rounds);
  digitalWrite(registerClk, HIGH);      //sends the signals down.
  if ( current == 0) {
    current = 295;
    //groupOn = groupOn + 1;
    Serial.println(groupOn);
    if (groupOn == 3) {
      groupOn = 0;
    }
  }
  if ((current % 10) == 0) {
    changeColour;
  }
  delay(tempo);
  current --;
  if (current == 0) {
    current = 255;
  }
}

void changeColour() {
  c = c + 3;
  //below resets the c variable back to zero so that the cycle continues
  if ( c == 21) {
    c = 0;
  }
}
//1. calling group led types. multicolour
//total 30 LEDs, 3 groups

void groupOFF() {
  for (int i = 0; i < 6; i++) {
    allOFF;
  }
}

//calls the coloured LED
void callmLED(int i) {
  if (i == 0) {
    allON;
    allOFF;
    allOFF;
    allON;
    allOFF;
    allOFF;
  }
  if (i == 1) {
    allOFF;
    allON;
    allOFF;
    allOFF;
    allON;
    allOFF;
  }
  if (i == 2) {
    allOFF;
    allOFF;
    allON;
    allOFF;
    allOFF;
    allON;
  }
}

//calls the led "strips"
void callSingleLED(int ledNumber) {
  int leftonLED = leftLine[ledNumber];
  int rightonLED = rightLine[ledNumber];

  //left line turn all off aside from main
  for (int offLed = leftLine[0]; offLed < (leftonLED - 1); offLed++) {
    digitalWrite(serialIn, LOW);
    digitalWrite(serialClk, HIGH);
    digitalWrite(serialClk, LOW);
  }
  for (int onLed = 0; onLed < 1; onLed++) {
    digitalWrite(serialIn, HIGH);
    digitalWrite(serialClk, HIGH);
    digitalWrite(serialClk, LOW);
  }
  for (int offLed = leftonLED; offLed < leftLine[10]; offLed++) {
    digitalWrite(serialIn, LOW);
    digitalWrite(serialClk, HIGH);
    digitalWrite(serialClk, LOW);
    //below repeated for the right line.
    for (int offLed = rightLine[0]; offLed < (rightonLED - 1); offLed++) {
      digitalWrite(serialIn, LOW);
      digitalWrite(serialClk, HIGH);
      digitalWrite(serialClk, LOW);
    }
    for (int onLed = 0; onLed < 1; onLed++) {
      digitalWrite(serialIn, HIGH);
      digitalWrite(serialClk, HIGH);
      digitalWrite(serialClk, LOW);
    }
    for (int offLed = rightonLED; offLed < rightLine[10]; offLed++) {
      digitalWrite(serialIn, LOW);
      digitalWrite(serialClk, HIGH);
      digitalWrite(serialClk, LOW);
    }
  }
}

//turns all the multicoloured LEDs OFF
void allOFF() {
  for (int i = 0; i < 3; i++) {
    digitalWrite(serialIn, LOW);
    digitalWrite(serialClk, HIGH);
    digitalWrite(serialClk, LOW);
  }
}

//turn numbers on, for whichever numbers on RGB colourings
void allON() {
  for (int i = 0; i < 3; i++) {
    int colour = colours[i + c];
    if (colour == 1) {
      digitalWrite(serialIn, HIGH);
      digitalWrite(serialClk, HIGH);
      digitalWrite(serialClk, LOW);
    } else {
      digitalWrite(serialIn, LOW);
      digitalWrite(serialClk, HIGH);
      digitalWrite(serialClk, LOW);
    }
  }
}

Maker Manual

Click on this link to be able to follow the Maker Manual for our project.