Group 11-Project 6

Your Own Talking and Loving Teddy Bear

Do you remember what you had as a toy in your childhood? Everyone may have a toy when he was young, and regard them as friends and the most precious memories.Teddy bear should be the most popular plush toy. Children think it’s very cute and fluffy. But normal plush toys do not have the function of interacting with people. Now please imagine what an interesting interactive experience it would be if your teddy bear could achieve more interesting interactions with you? For example, if we greet you through the induction system and have the function of making sounds, will your life be richer? Our project is committed to trying to use the tools and knowledge of Arduino to achieve this idea.

Group Members

NameWork
Jialu GaoDocument blog design
Physical Arduino board test
Humayrah SiddiquePhysical Arduino board test
Coding
Adrian Donald Oluyemi AllenPhysical Arduino board test
Coding

Maker Manual

Components used

  • Arduino Uno
  • RFID-RC522
  • 2xServo
  • 2xRGB LED
  • 6×220 Ohm Resistors
  • Wires
  • 5W Speaker
  • 1x1k Ohm Resistor
  • DFPlayer Mini
  • Micro SD Card

Build section (how you made the physical aspects of your project).

  1. LEDs
    • You will need to use the RGB LEDs, 220 Ohm Resistors and wires
    • Connect the longest wire to either 5V or GND. You will know which one to use by testing the light with generic analogWrite code.
    • Connect the R, G and B wires to analog pins via the 220 Ohm resistors. We have used A0, A1 and A2.
    • Repeat this with the second RGB LED.
  2. Servo
    • You will need to use Servos and wires
    • Connect the yellow, red, and brown wires to the analog pin, 5v, and ground respectively.
  3. RFID
    • You will need the RFID tag reader and wires
    • Connect each wire to the correct pins as shown below:
  4. Speaker
    • You will need the SD Card reader, Speaker, SD Card and wires
    • Make sure you have a formatted SD with two mp3 files on it that are shorter than 5 seconds
    • Insert the SD card into DFPLayer and then connect the speaker to pins ‘spk1’ and ‘spk2’ of the DFPlayer.
    • Connect the resistor to the RX pin of the DFPlayer
    • Connect a wire to the VCC pin of the DFPlayer
    • Connect a wire to GND and another to 5v
  5. Putting it all together
    • We are going to connect everything via the ground and 5v columns on the breadboard. Everything else can go straight to the Arduino Uno controller.
    • Run the code below in your Arduino IDE
//Libraries
#include <Servo.h>
//for RFID 
#include <SPI.h>      
#include <MFRC522.h>
//Speaker
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"

//Global Variables
Servo leftFoot;
Servo rightFoot;

String currentUserID= "";
String GOOD_USER = "43 60 A2 19";
String BAD_USER = "53 BD E5 12";
int loggedIn = 0; //neutral 0 friend +1 enem -1

int pause = 500;  //pausing before switching modes

//for RFID
#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN);   // Create MFRC522 instance.

//speaker
static const uint8_t PIN_MP3_TX = 2; // Connects to module's RX
static const uint8_t PIN_MP3_RX = 3; // Connects to module's TX
SoftwareSerial softwareSerial(PIN_MP3_RX, PIN_MP3_TX);

DFRobotDFPlayerMini player;

void setup() {
  setupRFID();
  setupLED();
  setupServo();
  setupSpeaker();
}

void loop() {
  String cardScanned = lookForCards();

  if (cardScanned != "") {
    Serial.println("Card scanned.");

    if(currentUserID==""){
      Serial.println("User not logged in yet.");
      currentUserID=cardScanned; //attempt login
      if(loggedIn == 0){
        Serial.println("Logging in...");
        login();
      }
    }else if(currentUserID==cardScanned){
      logout(); //clears
    }else{
      Serial.println("You cannot switch users until you have logged out.");
    }
  }

  delay(pause);

  if(loggedIn==-1){
    unfriendlyMode();
  }
  else if(loggedIn==1){
    friendlyMode();
  }
  else{
    neutralMode();
  }
} 

void setupRFID(){
  Serial.begin(9600);   // Initiate a serial communication
  SPI.begin();      // Initiate  SPI bus
  mfrc522.PCD_Init();   // Initiate MFRC522
  Serial.println("Approximate your card to the reader...");
  Serial.println();
}

void setupLED(){
  //left eye r,g,b
  pinMode(A0,OUTPUT);
  pinMode(A1,OUTPUT);
  pinMode(A2,OUTPUT);
  //right eye r,g,b
  pinMode(A3,OUTPUT);
  pinMode(A4,OUTPUT);
  pinMode(A5,OUTPUT);
}

void setupServo(){
  //left foot
  leftFoot.attach(6);
  //right foot
  rightFoot.attach(5);
}

void setupSpeaker(){
  Serial.begin(9600);
  softwareSerial.begin(9600);

  if (player.begin(softwareSerial)) {
    player.volume(15);  //0-30
       Serial.println("OK");

   // player.play(1); //play 1 is good, play 2 is bad
  } else {
   // Serial.println("Connecting to DFPlayer Mini failed!");
  }
}

String lookForCards(){
  //Checks if a card is physically present and is a valid RFID tag
  if ( ! mfrc522.PICC_IsNewCardPresent()) 
  {
    return "";
  }
  if ( ! mfrc522.PICC_ReadCardSerial()) 
  {
    return "";
  }

  String temp=""; //active card scanned
  for (byte i = 0; i < mfrc522.uid.size; i++) 
  {
     temp.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));
     temp.concat(String(mfrc522.uid.uidByte[i], HEX));
  }
  temp.toUpperCase();
  return temp;
}

void login(){
  if (currentUserID.substring(1) == GOOD_USER){ //change here the UID of the card/cards that you want to give access
    loggedIn = 1;
    printLogin(currentUserID.substring(1));
  }
  else if(currentUserID.substring(1) == BAD_USER){
    loggedIn = -1;
    printLogin(currentUserID.substring(1));
  }
}

void friendlyMode(){
  colourEyes(0,255,0);
  moveFeet(90,1);
    player.volume(15);

  player.play(2);
}

void unfriendlyMode(){
  colourEyes(255,0,0);
  moveFeet(90,2);
    player.volume(15);
  player.play(1); //lay sad sng
}

void neutralMode(){
  colourEyes(200,0,200);
  moveFeet(0,0);
    player.volume(0);
  //player.play(1); //lay sad sng
}

void logout(){
  Serial.println("You have logged out.");
  loggedIn = 0;
  currentUserID = "";
}

void printLogin(String id){
  Serial.println("You are logged in as "+id+" .");
}
void colourEyes(int r, int g, int b){
  //cathode ver.
  r = 255-r;
  g = 255-g;
  b = 255-b;

  //left eye
  analogWrite(A0,r);
  analogWrite(A1,g);
  analogWrite(A2,b);

  //right eye
  analogWrite(A3,r);
  analogWrite(A4,g);
  analogWrite(A5,b);
}

void moveFeet(int angle, int speed){
  if(angle==0 && speed==0){
    delay(1000);
    return;
  }

  int pos = 0;
  int delayTime = 25;

  for(pos=0; pos<=angle; pos+=speed){
    leftFoot.write(pos);
    rightFoot.write(pos);
    delay(delayTime);
  }

  for(pos=angle;pos>=0;pos-=speed){
    leftFoot.write(pos);
    rightFoot.write(pos);
    delay(delayTime);
  }
}

//int arrayLength(int arr[]){
//  int arrayLength = sizeof(arr)/sizeof(arr[0]);
//  return arrayLength;
//}


How to play:

Wait for the eyes of the bear to turn purple. That is you are ready to log in. Use your card and bring it to the bear’s tummy. After a few seconds, the bear should know that it is you and be happy. Happy music will play, the LEDs will be green, and the feet will dance. If it is not you, they will be angry. An alert sound will be played, the eyes will be red, and the feet will move very fast. Bring your card to the bear’s tummy again to log out. They eyes should go back to purple if it is successful.

Process Going

Project Task List

November 16,2022Meet up and begin discussion about topicAll members
November 18,2022Allocate roles of each peopleAll members
November 21,2022Create group on Teams and GithubHumayrah
November 25,2022Brainstorming and reference togetherAll members
December 5,2022Basic circuitHumayrah
Adrian
December 8,2022Combine breadboard, get 2 RGB led and readerHumayrah
Jialu
December 9,2022Get the sound workingAdrian
December 10,2022LEDS and shift register workingHumayrah
Adrian
December 11,2022Servo workingHumayrah
Jialu
December 12,2022Combining all features All members
December 13,2022Implement on documentJialu for main structure, design and writing
other members also put some info

November 16, 2022. Members meet up and discuss and determine the topic.

project selection

November 18,2022. Allocate roles inside the group and began doing searching.

Research

  • https://www.smythstoys.com/uk/en-gb/toys/fashion-and-dolls/cosmetics/funlockets-secret-diary-journal-glitter-edition/p/208696
  • https://www.argos.co.uk/browse/toys/teddy-bears-and-soft-toys/c:30308/type:interactive-soft-toys/
  • https://www.amazon.co.uk/glow-bear/s?k=glow+bear

November 21,2022. Create groups on Teams and Github. Set all requirements on for all members to check any time.

Example of content discussed on 21/11/2022

November 25, 2022. Brainstorming and posting reference together.

December 5, 2022. Building basic circuits and try to make it work.

December 8, 2022. Combine breadboards.

December 8,2022. Get 2 cathode RGB Led responding to the RFID sensor.

Colour of RGB LED responds to correct and incorrect RFID tags.

December 9,2022. Get the sound working.

Extending the first speaker length to fit the teddy bear.

As two led are the eyes of teddy bear, we need to get tested both of them are working and the system could receive different sign and give different feedback.(Red light for wrong, Green light for correct).

December 10, 2022. Get 2xRGB LEDs to respond to the RFID Tag with the same behaviour.

December 10,2022. Tested for both led represent eyes of the teddy bear working. Try to incorporate shift register.

December 11,2022. Get the servo working and combine them together. Buy the teddy bear.

RFID+Servos+RGB LEDs
Final Prototype

Code Explanation

Explanation of Setup Functions
Explaining the choice of good user / bad user
Explaining the RFID scanner behaviour
The core loop of our program
The behaviours of our teddy bear

Design choices

  • We chose a log in / log out system because we wanted to add non timed functionalities
    • As of now, the teddy bear only wiggles, colours and makes noise. We wanted to add interactable features like pressing one paw to record a message and one paw to play back a message. This would have needed a login/logout system as the teddy bear will need to know when the user is done using it.
    • Arduino also caches lots of information that is hard to wipe. The login/logout system allows a neutral/reset point to clear all the data so no data is overwritten
  • We chose to put the servos in the feet as we thought a foot wiggling motion would be cute and display its emotion (anxious- fast, calm- slow).

Shortcomings

  • Speaker may bug – loudness can reset and .mp3 can be cut short.
  • Teddy bear cannot move very far – it depends on the length of the soldered wires
  • LEDs can be hard to work with – very often the eyes are wonky
  • Reactions are simple right now – we can add more complex behaviours
  • There is only 1 good user and 1 bad user, we can change this in the future

n^3 (group 7) – Toy Car

Project Brief

To design and assemble a prototype of a toy that aims to teach programming. Osmo, Lego boost robotics, code & go robot mouse activity set, and the code-a-pillar are just some of a vast range of such toys that already exist in the market.

Project Goals

Purpose

To provide an engaging way to teach children basic coding principles without having to go through the hassle of learning a foreign coding language and installing a bunch of software. The 5 main elements of coding are Input, Output, Looping and Conditionals, Mathematical Operations and Variables and Data Structure. Our product teaches children most of these core elements in a fun and straightforward way that maintains their attention. It will also act as an efficient segue for them into more complex programming interfaces in the future.

Objectives

  • Ensure that it is easy to use for children
  • Maximize each child’s potential and creativity through an interactive playing experience.
  • Make the product as functional as possible
  • Ensure physical components (such as Arduino Uno) do not hinder the purpose of the product
  • A product that receives inputs and produces an output.

Target Audience

The target demographic is children aged 3 to 6, an age group that has little fine motor skills allowing them to hold objects, press buttons and utilize tools. At this age children begin to become more curious about the world around them and how certain things work. This curiosity will make them want to play with our product which will in turn develop their computational thinking skills and problem solving skills.

Market Research

1. Osmo

Coding Starter Kit

Ages: 5-12

Osmo consists of a base unit that you slot the iPad or Fire tablet in portrait mode on, and a little plastic mirror cap that fits over the camera so the iPad can ‘see’ what’s happening on the table below. This “Reflective AI technology” allows kids to play with physical items in the real world while still benefiting from the power of iPad technology.

2. Sphero Bolt – A Programmable Robot Ball

Coding Robot

Ages: 8+

Sphero Bolt is a translucent version of the robot ball (about the size of a tennis ball) that packs loads of sensors and a programmable LED matrix, but any of the Sphero models will work with the iOS or Android app – including the much cheaper Sphero Mini, or, if you can get your hands on them, the Star Wars droids including BB-8, BB-9E, and R2-D2.

3. Let’s Start Coding Code Rocket

Rocket Setup

Ages: 8+

Using a Windows, Mac or Chromebook computer, child coders can control the rocket booster LEDs and deep space headlights, have fun with the laser blasters with sound effects, Morse code light and sound messages, and start the countdown to lift-off sequence.

Conclusion

There are many products on the market that try to tackle the challenges of teaching kids the theory of code/programming in an entertaining and efficient way. However, none of them depict runtime errors. We plan to take the basic idea of a physical based programming interface and add upon it, by having the sequence stop when a collision has occurred. (This is done through sensors detecting if a wall is within range). We will also utilize blinking LEDs to provide visual feedback if an obstacle is identified.

Design Decisions

1. (3) navigation buttons [right, forward, left]

As opposed to the stereotypical 4 ones [right, forward, backward, left]. This is because the car will not be required to move backward for play, especially during the early stages of familiarizing a child with coding. Backwards is a command reserved for more complex sequences.

2. (1) RGB LED

Due to time constraints, instead of providing 2 LEDs to act as the pupils of the car, one LED will protrude from the hood of the car and act as a siren light.

3. Removal of sensors

Due to time and space constraints, the Arduino UNO does not have enough pins for all the components. Using a shift register would have required that we change the design of the car and make it abnormally large; something that the child would not be able to manage.

4. Car trunk

We decided to make a cover for the batteries to imitate the back trunk of a car: an intuitive and fun design to help the child relate the toy to real life and feel included with adult activities.

Prototypes

Low Fidelity – Detailed Sketches

Conceptual design of the car – emulates “Cars” movie toy
Top view – Level (1)
Top view – Level (2)
Side view – Both levels

High Fidelity – Technical Drawings

Isometric view (1)
Isometric view (2)
Side view
2D production diagrams

Task List & Group Member Roles

Nadia

Project Manager (Assembling, Physical Prototyping, Testing, Design Blog)

Nicolas

Lead Designer (Assembling, Coding, Physical Prototyping, Testing, Upload Blog)

Nathanael

Lead Programmer (Coding, Code Prototyping, Testing, Design Blog)

WEEK EIGHTBuild Team and Assign Roles
Decide on a Project Brief
Conduct Market Research
Meeting 1
WEEK NINEBrainstorm Ideas
Research on components needed for project ideas
Low-Fi Prototype 
Meeting 2
WEEK TENOrder components needed to build final product
Use currently available components to build a technical prototype
Code Prototype (tester)
Plan extra features
Meeting 3
WEEK ELEVENCollect components
Finish physical build
Finalize Code
Evaluate project
Final Meeting
WEEK TWELVEPRESENTATION WEEK
-Showcase product
-Complete documentation/design blog(CIO wordpress website)
Gantt Chart

Maker Manual

Components

  1. X1 GSD-329 ScrewDriver
  2. X1 Car Shell
  3. X1 L298N Dual H Bridge Stepper Motor Driver Board
  4. X4 DC 3V-6V Single Axis Gear Reducer Motor
  5. X2 RGB LED (Optional, visual indication of collision)
  6. X5 Buttons
  7. X4 Smart Robot Car Tyres Wheels For TT Gear Motor Chassis
  8. X2 Breadboard
  9. X1 Sensor
  10. X1 DollaTek 4 x AA 6V Battery Holder Case Box Wired ON/OFF Switch and Cover

Breadboard Layout

Arrangement of components

How to Build

  1. Cut out all cardboard components to prepare them and keep them on standby
  2. Solder Ground and Positive wires to all 4 motors
  3. Solder elongated to wires to buttons (make sure to connect 2 teeth protruding from the same side, and not on opposite sides)
  4. Solder elongated wires to designated RGB LED inputs (color code the wires to the inputs for intuitive understanding [ex. Red wire to red input])
  5. Connect motors to wheels
  6. Connect and screw to secure wires into designated output slots on the motor driver
  7. Connect all components as demonstrated in the breadboard layout

Testing Iterations

Short demo of performance

Shortcomings

  • Soldering is a bit weak on the motors making it easily removable/detachable. (Tape used to hold it in place)
  • Not as powerful when using a battery compared to plugged in directly, believe it’s due to the battery not providing enough power/voltage to the Arduino UNO
  • Cardboard base is weak and not strong enough to protect the arduino from children recklessness (a more sturdy recyclable material should be used/OR reinforce cardboard with paper mache)
  • Buttons used are too small for children to use.
  • Could have a display to show what the current input sequence is in case the user forgets.
  • Using a stripboard and solder parts on a breadboard may have been a more neater option.
  • Huge battery drain, possibly a voltage issue and lack of resistors for efficiency purposes a rocket switch/power switch should’ve been included.
  • Exposed wires tend to touch each other causing undesired colour changes in the LEDs. wiring could be more efficient using shorter wires and thicker soldering.

Commented Code

//Simple state check, this is for the main loop of the car combination
bool start;
 
//Storing the motor pins for forward and reverse movement
int l_motorR = 13;
int l_motorF = 12;
 
int r_motorF = 11;
int r_motorR = 10;
 
//Left
int button1Pin = A0;
//Start
int button2Pin = A1;
//Forward
int button3Pin = A2;
//Right
int button4Pin = A3;
//Reset
int button5Pin = A4;
 
//Keep track of all button states
int button1State;
int button2State;
int button3State;
int button4State;
int button5State;
 
//Rather than an array which has a fixed size it's better to use a string and loop through each character as you can add to a string at any point;
String commands;
 
//RGB LED Pins
int redPin = 5;
int greenPin = 6;
int bluePin = 3;
 
void setup() {
  // put your setup code here, to run once:
  //Setup all pins
  pinMode(l_motorR, OUTPUT);
  pinMode(l_motorF, OUTPUT);
  pinMode(r_motorF, OUTPUT);
  pinMode(r_motorR, OUTPUT);
 
  pinMode(button1Pin, INPUT);
  pinMode(button2Pin, INPUT);
  pinMode(button3Pin, INPUT);
  pinMode(button4Pin, INPUT);
  pinMode(button5Pin, INPUT);
 
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);
 
  //Reset Check Vars
  start = false;
 
}
 
void loop() {
 
  // put your main code here, to run repeatedly
  //Read all button Inputs
  button1State = digitalRead(button1Pin);
  button2State = digitalRead(button2Pin);
  button3State = digitalRead(button3Pin);
  button4State = digitalRead(button4Pin);
  button5State = digitalRead(button5Pin);
 
  //Set LED to Cyan at first
  setLED(255, 0, 0);
 
  //If(Left button pressed)
  if (button1State == HIGH) {
    commands += "1";
    delay(500);
  }
 
  //if (start button pressed)
  if (button2State == HIGH) {
    start = true;
  }
 
 //if (forward button pressed)
  if (button3State == HIGH) {
    commands += "2";
    delay(500);
  }
 
   //if (right start button pressed)
  if (button4State == HIGH) {
    commands += "3";
    delay(500);
  }
 
 //if (reset button pressed)
 if (button5State == HIGH) {
    Reset();
    delay(500);
  }
 
  //Force the loop to be stuck here until the string of commands is complete
  while (start) {
    //Set Color to Green to show it is running the commands
    setLED(255, 0, 255);
   
    //for loop to go through each character of the string
    for (int i = 0; i < commands.length(); i++) {
      if (commands[i] == '1') {
        Left(3500);
      } else if (commands[i] == '2') {
        Forward(3500);
      } else if (commands[i] == '3') {
        Right(3500);
      }
    }
    //reset everything when command is completed
    Reset();
    start = false;
  }
}
 
void Reset() {
  commands = "";
  setLED(0, 255, 255);
  digitalWrite(12, LOW);
  digitalWrite(11, LOW);
  digitalWrite(10, LOW);
  digitalWrite(13, LOW);
  delay(300);
  end = false;
 
  Serial.print("Reset");
}
 
void Forward(int delayTime) {
  digitalWrite(12, LOW);
  digitalWrite(11, LOW);
  digitalWrite(13, HIGH);
  digitalWrite(10, HIGH);
  delay(delayTime);
}
 
void Left(int delayTime) {
  digitalWrite(12, LOW);
  digitalWrite(10, LOW);
  digitalWrite(11, HIGH);
  digitalWrite(13, HIGH);
  delay(delayTime);
}
 
void Right(int delayTime) {
  digitalWrite(12, HIGH);
  digitalWrite(10, HIGH);
  digitalWrite(11, LOW);
  digitalWrite(13, LOW);
  delay(delayTime);
}
 
//Set RGB Values for Light
void setLED(int red_light_value, int green_light_value, int blue_light_value) {
  analogWrite(redPin, red_light_value);
  analogWrite(bluePin, blue_light_value);
  analogWrite(greenPin, green_light_value);
}

Group 5: Parrot Theatrical Prop

We chose to create an interactive parrot theatrical prop.
This prop would be used during a live performance to interact with the audience and bring life into the scenery. 

Sketching and Ideation

  • The main interactive feature in our design is the wing movement:
    The two wings of our parrot will be moving in a motion that resembles flying.
  • Complementary interactive features:
  1. Sound effects: our prop will be able to make parrot sounds 
    we also planned to add a microphone to record the user’s audio which the parrot will then be able to repeat.
  2. Light: the eyes of the parrot will light up in the dark
Early design sketches of the parrot and exploration of the wings’ range of movement

Low-Fi prototype

paper prototype showing feather groups of wings
reverse side with lolly sticks showing bone structure

Supplies

We aimed to make sustainable design decisions and use recycled materials as much as possible:

  • For the main body of the parrot, we chose to use a 2-litre plastic water bottle that provides shape and also allows us to hide the wooden wings’ supporting structure.  
  • For the head, we used another 0.5-litre water bottle and added a beak-like part, also made out of the plastic bottle.
  • For the base, we used a cardboard box that hides most of the Arduino’s electronic components to achieve clean aesthetics on the exteriors.
  • For the wings, we chose to use umbrella parts which allow for a similar movement to that of a wing.

Wing mechanism testing

The wing structure and motion were achieved using a broken foldable umbrella controlled using a servo. We used 90 degrees range of movement to open and fold back the wing.

foldable umbrella mechanism explained
wing mechanism sketches
umbrella rib with feather groups (folded)
umbrella rib with feather groups (outstretched)
wings with body

Internal structure

wooden structure with servos and wings attached

Paper Mache

In order to create a solid base for the acrylic colouring as well as to add a feathers-like texture, we used paper mache in both the body and the head of our prop.

Inside: body with a head and supporting wooden structure
Outside: body and head (paper mache) with wings attached to the internal structure

Colouring

We used acrylic paint for the surface area to achieve the typical macaw parrot’s look and create a tropical leaf pattern on the box at the base.

Wing motion

Project Task List

TaskDeadlineAssignment
Researching components required25th NovemberInbar
Making body exterior29th November Luciana
Making wings29th NovemberOlivia
Creating internal structure 2nd DecemberLuciana & Olivia
Adding microphone and speaker functionality2nd DecemberInbar
Adding wing controls 6th DecemberOlivia, Inbar & Luciana
Decorating exterior9th DecemberLuciana & Olivia
Adding speaker control9th DecemberInbar
code testing10th DecemberLuciana, Olivia and Inbar

Maker Manual

Overview

This is a Macaw parrot which can flap its wings and make noises. The wing speed can be controlled using a potentiometer, as well as stopping the wings at the open or closed position. The parrot sounds can be activated by pressing a button.

Tools and supplies

Electrical components:

  • 2 arduino unos
  • 2 SG90 servo motors
  • 1 potentiometer
  • 1 button
  • 1 led (red)
  • 1 8O3W-JST-PH2.0 Speaker
  • 1 Micro SD SPI Storage Board
  • 1 micro SD card

Non-electrical components

  • 2 litre plastic bottle
  • 0.5 litre plastic bottle
  • 2 umbrella ribs
  • cardboard box
  • thin paper (for paper mache)
  • thicker paper (for wings and leaves)
  • rectangular wooden dowels
  • screws
  • nails

tools:

  • glue gun
  • hammer
  • screw driver

Build

First, disassemble an old umbrella, leaving 2 ribs. Cut out two ‘feather sections’ out of paper and stick them onto the umbrella ribs.

Next, make the internal skeleton out of some rectangular wooden dowlels. A central thicker piece (a bit longer than length of 2 litre bottle), and three thinner pieces (length is diameter of bottle) arrange two of the dowels near one end of the central dowel, a servo width apart. Secure these dowels to the central dowel with nails and/or wood glue. Attach the third shorter dowel further down the stick at a perpendicular angle to provide more support once inside the bottle. Position the two servos vertically between the wooden dowels, about 4cm apart, and add screws to secure them. Screw servo arms onto the servos.

With the 2 litre plastic bottle, cut two holes, about 1.5cm by 7cm on either side of the bottle, at the position of the wings. Cutting out a panel of the bottle can be useful at this point. Put the wooden skeleton inside the bottle, lining up the servos with the gaps in the bottle. Arrange the wings at the correct position, with the umbrella directly over the center of the servo, and the runner angled to the central dowel. Use hot glue to attach the umbrella rib to the servo arm and at the end of the runner to the central dowel. Do this for both wings. That is the mechanism finished. You may choose to paper mache the bottle and decorate before assembling the mechanism, or after. To make the head, cut a 0.5 litre water bottle in half, cut a triangle from the leftover plastic, and stick it on curved to make a beak.

Layout and circuit diagram

Speaker audio

SD card containing our audio file which is used by our speaker (output) when triggered by the button (input)

Wing’s movement

The 2 servos (outputs) are controlled by the potentiometer (input) which can be monitored by the LED

Code

Our Code consists of two main interactive output components: the speaker and the servos. These are user-controlled using a button and a potentiometer. The LED allows for speed monitoring.

Speaker audio

This code allows the speaker to play an audio file saved on the SD card. At the setup, the connection with the SD card is established. This can be verified through the Monitor. When the button, linked to pin 2, is pressed, the audio file ‘parrot3.wav’ plays at a volume of 5. While the audio is playing, there is a 10-second delay to allow for the audio to complete before it can be played again.

#include <TMRpcm.h>
#include <SD.h>
#include <SPI.h>

TMRpcm audio; // make instance variable
TMRpcm tmrpcm;   // create an object for use in this sketch

const int buttonPin = 2; // the number of the pushbutton pin

int buttonState = 0;  // variable for reading the pushbutton status

#define SD_CSPin 4 // defines the CS pin of the SD card.

void setup() {
  tmrpcm.speakerPin = 9; //11 on Mega, 9 on Uno, Nano, etc
  tmrpcm.setVolume(5); //audio's volume (0-7)

  //initializes the serial connection between the Arduino and any connected serial device
  Serial.begin(9600);
 //initial the SD card connection and verification through the serial monitor
  Serial.println("loading... SD card");
  if (!SD.begin(SD_CSPin)) {
    Serial.println("An Error has occurred while mounting SD");
  }
  while (!SD.begin(SD_CSPin)) {
    Serial.print(".");
    Serial.print("h");
    delay(500);
  }
  audio.CSPin = SD_CSPin;

  // initialize the pushbutton pin as an input
  pinMode(buttonPin, INPUT);

}

void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed. If it is, the buttonState is HIGH
  if (buttonState == HIGH) {
//play the audio
    tmrpcm.play("parrot3.wav");
//1 second delay
    delay(10000);
  } 
}

Wing movement

This code adds the wing movement functionality to our parrot. It makes use of the Servo library. It starts by initialising some variables including maxDegree, minDegree (boundary movements of the wings), speed (used to control the speed of the wing movement), and ledPin, sensorPin (potentiometer input), sensorValue (potentiometer value).

In setup, the servos and LED are attached to their respective pins. In the loop, the getSpeed function is called, getting the current potentiometer value and mapping it to a value between 10 and 50, determining the speed of the servo movement. If the potentiometer is all the way to the low end, the wings will stay open. If the potentiometer is turned all the way to the high end, the wings will stay closed. If the potentiometer is not at the highest or lowest values it will flap, with the speed depending on the position of the potentiometer.

The openWing and closeWing functions work by creating two variables lDegree and rDegree (the angle of each wing) they then loop from minDegree to maxDegree (for open wing) with the delay fetched from the getSpeed function. An LED also blinks at a speed relative to the wing speed. If the wings are at a multiple of 20 degrees, the LED turns off, else if they are at a multiple of 10, the LED turns on. This causes the light to blink faster or slower with the movement of the wings.

#include <Servo.h>

Servo Lservo;  // create servo object to control a servo
Servo Rservo;

int maxDegree = 80;
int minDegree = 10;

int sensorPin = A0;    // select the input pin for the potentiometer
int sensorValue = 0;  // variable to store the value coming from the sensor
int speed;
int ledPin=7;

void setup() {
  Lservo.attach(5);  // attaches the servo on pin 9 to the servo object
  Rservo.attach(6);
  pinMode(ledPin, OUTPUT);
}

void loop() {
  int nspeed = getSpeed();

  if(nspeed <=20){
    //wings open
    Lservo.write(minDegree);
    Rservo.write(180-minDegree);
  }else if(nspeed >= 40){
    //wings closed
    Lservo.write(maxDegree);
    Rservo.write(180-maxDegree);
  }else{
    //flap wings
    openWing();
    closeWing();
  }
}

//gets current value from potentiometer and maps it to a suitable speed value
int getSpeed(){
  sensorValue = analogRead(sensorPin);
  speed = map(sensorValue, 0, 1028, 15, 50);
  return speed;
}

//moves the servos from the minimum degree to the maximum degree
void openWing(){
  int lDegree;
  int rDegree;
  for (int i = minDegree; i<=maxDegree; i++){
    lDegree = i;
    rDegree = 180 - lDegree;
    Lservo.write(lDegree); // sets the servo position according to the scaled value
    Rservo.write(rDegree);

    //led bink
    if(i%20==0){ //led turns off every multiple of 20
      digitalWrite(ledPin, LOW);  
    }
    else if(i%10==0){ //if not a multiple of 20, but a multiple of 10, led turns on
      digitalWrite(ledPin, HIGH);
    }
    int nspeed = getSpeed();
    delay(nspeed);   
  } 
}

//moves servos from max degree to minimum degree
void closeWing(){
  int lDegree;
  int rDegree;
  for (int i=maxDegree; i>=minDegree; i--){
    lDegree = i;
    rDegree = 180 - lDegree;
    Lservo.write(lDegree);
    Rservo.write(rDegree);
    if(i%20==0){
	    digitalWrite(ledPin, LOW);  
    }
    else if(i%10==0){
      digitalWrite(ledPin, HIGH);
    }
    int nspeed = getSpeed();
    delay(nspeed);   
  }  
}

Testing and shortcomings

Software testing

The goal of this series of tests is to ensure the program runs smoothly and the logic of the code functions properly. To do so, we eliminate the physical components and use print commands to the monitor to follow the program step by step.

  1. Serial.println(lDegree) and Serial.println(rDegree) – This allows us to see the angles achieved by the servos in the serial monitor to check that the code was working as intended.
  2. Serial.println(nSpeed) and Serial.println(sensorValue) – Used to check that the correct range of values was being passed in by the potentiometer and that they were being mapped correctly into the speed at which the servos would turn.
  3. Serial.println(‘button pushed’) and Serial.println(‘played audio’) – Used to test that the code was going through the correct if statement when the user interacts with the button and used to test that the audio was being played.
  4. Using online tools (tinkercard.com) to test that our software was functional thus allowing us to see that the issue was the hardware.

Hardware testing

The goal of this series of tests is to ensure that every physical component used for our prop is functioning correctly on its own and is connected properly.

  1. Using the example servo code provided by the Arduino IDE to test the servo’s functionality and range as well as the potentiometer.
  2. When faced with issues we changed the wires and breadboard used in the circuit to test if that was the issue.
  3. Voltmeter testing with faulty components.
  4. We used separate breadboard and Arduino for the servo circuit and the speaker circuit at first before adding them together to make sure everything was functional and make testing easier.

Shortcomings

Our recording functionality was not working properly. In order to locate the root issue and fix it, we checked the hardware and the code separately. We tested each hardware component one at a time using a voltmeter to ensure all of the electronic components are fully functional. Unfortunately, we discovered the microphone component was faulty and therefore could not be used. Due to time restraints, we could not order a new microphone and had to give up on this feature.

Furthermore, the time constraints as well as the size of the breadboard made it difficult to add the LEDs for the eyes. Upon evaluating the priorities for the project we decided that the LED would be more suitable for a ‘creepy’ prop and it would be better to not use that idea on the final product.

Using a voltmeter to ensure the electrical components function as intended

The Plant Caretaker

What if you didn’t have to worry about who would look after your plants when you are away on holiday? The Plant Caretaker is an automatic irrigation system that uses Arduino to water your indoor plants! This type of system can be useful for those who want to make sure their plants are healthy and receive the appropriate amount of water each day. Without over- or under-watering.

There are several features in the system. The plant caretaker checks the soil moisture level daily and if the soil is wet enough, a green LED will turn on indicating a watered plant. Whereas if the soil is dry, it will start watering the plant and make a sound, to show that it has successfully hydrated the plant. A red LED light appears if the water reserve has run out, alerting the user.

User’s Manual 

  1. Stick a moisture sensor into the plant pot. Make sure it is around 2-5cm deep and label has to face outward from the pot for the sensor to work properly
  2. Fully submerge the water pump into the water container
  3. Run the system!

*Red light = not enough water supply

*Green light = enough water supply and/or the plant is watered

*Sound = plant has been successfully watered

Tips: To make sure your plant is in the healthiest state: Make sure your plant get adequate sun light for their type!

Project Overview 

Purpose and aim

The project’s aim is to look after the user’s plant for them. It also gives user an alternative choice to how they’d like to take care of their plants – our indicator, the light and sound notifications

Target Audience

To use it indoor with any types of plants

Market Research

Most common types of self watering plant product would range around 20-300+ GBP. Most has watering system inside the product and rely on the plant’s ability to absorb water from it. Which we think lack a visual indication for users, relying solely on the belief that the product does it job. Moreover, focus more on the aesthetic side of the product.

Design choices

Usability

It is effective since it is reliable and waters the plant daily. User may struggle to water the plant everyday, over- or under-watering. Plant Caretaker has a set amount of water, and can be changed depending on the size of the plant.

User Experience 

It is entertaining. The sound notification it produces provide a entertaining way for the user to know that their plant is watered. User can also get creative with the sound notification by changing the note.

Feedback 

The Plant Caretaker gives the user feedbacks. It plays a sound to let them know the plant is successfully watered, in addition, the user also get a visual aid of the water flowing from the water supply to the plant through the clear plastic tube.

Project Process

Group Meeting

17th November

We discussed about each project and decided to go with ‘Monitoring your plant’. We then start looking at the products in the market and also some example projects. We concluded that most product on the market are quite costly and most serves an aesthetic function for house’s decoration and not very much technical features. There is also an all round product which included artificial lightning, but is also very costly.

We discussed possible consideration list and ideas. Such as the amount of water each types of plant would need, how to make it independent of the computer ,other variable factors such as sunlight, location of the plant (indoor, outdoor, which effects humidity level)

21st November

During the lab we look through some examples:

https://www.youtube.com/watch?v=JdvnfENodak

And realises that the project needs a personalisation. We pitched in ideas of how to make it different from the other automatic/self watering products and decided to incorporate LED pins, piezo and a plushie. These will help indicate different situations and interact with the user.

LED pins could possibly be used for indicating if the water in the water supply container is running out. It has to be the pins because its more subtle and you can spot it all the time unlike the piezo where it might play a sound just once.

The piezo could be playing sound to interact with the user.

We ordered 3 moisture sensors and 3 temperature and humidity sensors.

Figure 1. Low fidelity prototype

28th November

We first tested the moisture sensor and figure out the coding required. We calibrated the sensor and set the threshold value at 300. The higher the value the dryer the soil, vice versa. Therefore if the sensor is reading a value lower than 300, it turns on the green LED indicating everything is okay and if the value is over 300, it turns on the water pump.

One limitation we found when calibrating was the moisture sensor only take reading on one side of it. The side with the label. Therefore it could be easily placed on the side of plant pot.

Consideration list includes different types of plants, we decided to categorise plants into sizes. Depending on the sizing, would be different amount of water needed. Research done on the different sizes of pots and amount of water needed for each. Assumption made: Indoor, relatively humid and receiving adequate sunlight daily.

We decided which features the LED pins and piezo would do:

constant red // sound(beeping?) = need more water

constant green = everything is working fine, plant is watered

sound = to give feedbacks that the plant is watered and when it is dry

30th November

We tested both the water pump and the moisture sensor with real plant. We decided to use size small plant and both are herbs that can be easily grown indoor, quite sensitive to water level and growth can be easily spotted in short period of time for the sake of project.

Testing it with real plant and the actual water pump makes us realise that there is a delay between the time it turns on and the time it start and end the watering period (due to the size pf the tube). Therefore the actual watering time is the actual amount of water that is going to be watered.

Size/cmWater pump on time/secondsWatering time/seconds
Small (5-10)25
Medium (10-15)36
Large (15-30)58
figure 2. watering time guide
figure 3. testing water pump and supply

We also realise there is a delay in the moisture sensor. The user has to make sure the sensor is facing the right way and is deep enough into the soil to detect the moisture level throughout the whole pot. It is also compatible with pot size larger than 15cm, since the sensor measures the resistance of the soil, the more water in the soil, the lower the resistance.

9th December

Testing different ways we can incorporate the LEDs and piezo speaker into the plushie. We connect the LEDs and the piezo to make sure they can go inside the plushie. Using different types of wires we manage that.

10th December

We combine everything together. The plushie, piezo, LEDs, the water pump and the moisture sensor.

We encounter a problem, which is the water is not turning off. We then later realised the wire is wired incorrectly and to turn off the pump, you have to use the relay motor to control it.

11th December

Made sure everything work as plan and did our presentation slides.

The Product 

Maker’s Manual

Components

  • Submersible Pool Water Pump X1
  • Relay X1
  • Soil Moisture Sensor X1
  • Power supply X1
  • Water container X1
  • Red LED X1
  • Green LED X1
  • Piezo SpeakerX1
  • 560 Ohm resistor X2

Breadboard layout

Code

#define RELAY_PIN    A5 
#define MOISTURE_PIN A0 // higher the number dryer the soil
#define SPEAKER_PIN 9
#define R_LED 3
#define G_LED 4

#define THRESHOLD 300 

// int water_count = 0; //how many times the flower is watered
int length = 12;
// char notes[] = "ccggaagffeeddc ";
char notes[] = "eeeeeeegcde "; //jinglebell 

int beats[] = { 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 4, 4};
int tempo = 300;

void playTone(int tone, int duration) {
  for (long i = 0; i < duration * 1000L; i += tone * 2) {
    digitalWrite(SPEAKER_PIN, HIGH);
    delayMicroseconds(tone);
    digitalWrite(SPEAKER_PIN, LOW);
    delayMicroseconds(tone);
  }
}

void playNote(char note, int duration) {
  char names[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C' };
  int tones[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };

  // play the tone corresponding to the note name
  for (int i = 0; i < 8; i++) {
    if (names[i] == note) {
      playTone(tones[i], duration);
    }
  }
}

void setup() {
  Serial.begin(9600);
  pinMode(RELAY_PIN, OUTPUT);
  pinMode(SPEAKER_PIN, OUTPUT);
  pinMode(G_LED, OUTPUT);
  pinMode(R_LED, OUTPUT);


}

void loop() {
 
  int value = analogRead(MOISTURE_PIN); // read the analog value from sensor

  //when soil is wet
  if (value < THRESHOLD) {
    digitalWrite(RELAY_PIN, LOW);
    Serial.print("The soil is WET => turn pump OFF");
  }
  //when the soil is dry 
  else {
    Serial.println("The soil is DRY => turn pump ON");
    digitalWrite(RELAY_PIN, HIGH);
    delay(2000);
    digitalWrite(RELAY_PIN, LOW);
    //check if the soil is actually watered
    //if the soil is not watered
    delay(5000);
    int water_value = analogRead(MOISTURE_PIN);
    if(water_value > THRESHOLD){
      Serial.println("The soil is NOT WATERED, please fill the tank.");
      digitalWrite(R_LED, HIGH);
      digitalWrite(G_LED, LOW);
    }else{
      Serial.println("The soil is WATERED, thanks mate.");
      digitalWrite(R_LED, LOW);
      digitalWrite(G_LED, HIGH);
      //play sound after watered
      for (int i = 0; i < length; i++) {
        if (notes[i] == ' ') {
          delay(beats[i] * tempo);
        } else {
          playNote(notes[i], beats[i] * tempo);
        }
        delay(tempo / 2);
      }
    }
  }


  Serial.print(" (");
  Serial.print(value);
  Serial.println(")");

  //delay moisture testing for 10 sec
  delay(10000);
  //delay moisture testing for a day
  // delay(86400000);

Evaluations and Limitations

It is not suitable for outdoors. The power supply is not water proof which limited the use for this system.

The system can not operate without a computer, the power supply is use for the water pump

Assumption made about the environment of the plant can cause over-or under watering

Ho Ho Howdy Hat

By Milena Serych, Kamryn Dudwal and William Tremaglio

Have you ever seen Christmas cowboy hat? If not, you are about to see one, which reacts to your movement with colourful LEDs! This hat reacts according the distance to the ground, so in order to see some interesting colour patterns, do not be lazy and dance on different levels!

Purpose

Create an interactive addition to your costume for themed party or dance costume which will make you stand out in the crew.

Target audience

Anyone who likes to be noticed, dancers and other kind of performers who wear specific costumes, people looking for Halloween, Christmas or another Themed party costume.

Market research

Hats with implemented LEDs available in the market are not interactive – they just have hardcoded LED patterns but do not react to the user’s movement. That’s why our product would stand out in the market.

Tools and Supplies

Design Decisions/Problems

  1. We decided on the cowboy style hat because we thought it would make the sensor the least noticeable as well as allowing room for the arduino, the breadboard, and the battery pack. 
  2. We put the ultrasonic sensor in the front of the hat so that it picked up the ground/object in front of the person. If we had put it on the side it would have picked up the shoulder the whole time and on the back it would most likely pick up the person’s back as the hat tilted back.
  3. We put the arduino and the perfboard at the back of the hat. We initially wanted to put inside the hat, however it proved to be uncomfortable and made the hat not fit the person’s head. 
  4. We put the wires through the inside of the hat to conceal them as the wires from the sensor needed to reach the back of the hat.
  5. To make LED strips working we figured out how to use the NeoPixel library. 
  6. Initially the idea was to use the LilyPad for this project, as we are doing e-textile work that requires parts to be as small and unnoticeable as possible. But it would not be able to handle the amount of current required for the sensor and strip to work together (9V) – it would fire up at 5V. So we decided to keep working on Arduino Uno
  7. To make our hat more organized we decided not to use the breadboard but solder LED and Sensor connections to the small perfboard
  8. To power our project up we started from two 1,5V coin batteries but realized that we need at least 5V. Further in the project we figured out that the required voltage for the project to work properly is 9V, which we achieved by six AA batteries.
  9. After soldering everything to the perfboard we faced the problem of bad connection (it was either sensor or LEDs working) so we needed to resolder some parts to make connection better and more stable.

Design principles

Conceptual Model (how a particular product works): Have with integrated Ultrasonic sensor on the top of the hat facing to the floor to measure the disance from users head to the floor and change colours according to this distance.

Visibility: our main controls are Ultrasonic for input and LEDs for output. Everything is being powered with 6 AA batteries so user have a choice to turn on or off the LEDs by disconnecting it from the power supplier. Once it is powered all the user needs to do is move and dance, and hat will automatically change the colours using information from Ultrasonic.

Constraints: since it is a hat, it’s designed to be worn on the head to work properly as designed. As mentioned before, project is powered up with batteries so at some point user will need to change the batteries in order for the LEDs on the hat.

Shortcomings

A lot of testing and problem solving occurred throughout the duration of our project. We initially wanted to use the LillyPad Arduino instead of Arduino Uno to hide the circuit better, however we couldn’t get the battery to be strong enough to power both the ultrasonic sensor and the LED’s needed to complete the project. Throughout our project we tested individual elements like the ultrasonic sensor and the LED’s so that when we combined them it was easier to problem solve. The part that took the most testing was the batteries. It was difficult to know exactly how much the voltage needed to be in order to power everything we wanted it to. We went from a tiny coin battery to a two battery holder, to four, then six was the magic number of batteries. We also have a problem with hiding the wires inside the hat to make it fit and look better. We ultimately had to settle on taping them in place in our prototype.

Task List

  • William:
    • Worked on the software side of the project:
      1. Created an enum to represent the different types of LED patterns. Refractored the code to use the enum instead of hardcoded patterns.
      2. Split the code into separate functions to eliminate repeated code.
      3. Added comments and documentation to the code to explain the purpose and usage of each function.
      4. Organized the code into logical blocks to improve readability and maintainability.
      5. Tested the code to ensure that it works as expected and produces the correct results for each distance reading.
  • Milena:
    • Worked on the hardware side of the project:
      1. I gathered all the necessary components and soldered most of the items for the project.
      2. Connected the Ultrasound Sensor and LED Strip to the Perfboard using various soldered wires.
      3. Connected the Perfboard to the Arduino Board through soldering.
      4. Tested the setup to ensure that the components are functioning properly.
      5. Made any necessary adjustments or fixes to ensure that the hardware is working as expected.
  • Kam:
    • Worked on both the hardware and software sides of the project:
      1. Helped gather the necessary components and soldered some of the items for the project.
      2. Prepped the hat for implementation of the project by making any needed cuts.
      3. Researched the Adafruit Neopixel library and familiarized myself with its capabilities.
      4. Used my knowledge of the Neopixel library to lay out the foundation for the code that controls the project.
      5. Assisted with the testing of both the hardware and software of the project.
      6. Helped with any necessary adjustments or fixes to the code or hardware to improve the project’s performance.

Stages/Meetings

each group member created a low-fi prototype – Kamryn
each group member created a low-fi prototype – Will
each group member created a low-fi prototype – Milena
practice using the ultrasonic sensor
combining the sensor with the LEDs
putting sensor on hat
hiding wires of sensor
first completed version of the prototype
final completed version of the prototype
The Ho Ho Howdy Hat prototype finished!

Schedule

Task / WeekWeek 9Week 10Week 11Week 12
BrainstormingEveryone
PrototypingEveryoneEveryone
CodingWilliam & KamWilliam & Kam
SolderingMilenaEveryone
Prepping hatEveryoneEveryone

Breadboard Layout

This is the layout we used while testing. Connecting this layout to the Santa hat required a perfboard that works as a breadboard, using longer wire we can then string the perfboard to the different features to use

How to create…

  • Ensure the ultrasonic sensor and the LED’s work using the Arduino Uno and the breadboard
  • Start Soldering, solder wires, sensor, and LED’s to pin headers and then solder the perfboard, this way there’s no breadboard to attach to the hat
  • Cut two holes large enough for the ultrasonic sensor to fit at the front of the hat
  • Make one large incision at the front base of the hat, to put the wires through so they cannot be seen
  • make another incision at the back of the hat to put the wires from the perfboard as well as the wires necessary to connect to the Arduino Uno through
  • Attach the Arduino Uno and the 6-pack battery to the rear of the hat
  • Attach the battery pack to the Arduino Uno
  • Wrap the Neopixel LED strips around the buckle of the hat and slip the wire needed to be connected to the Arduino Uno into the slit at the front of the hat and our of the slit at the back of the hat
  • Add accessories, like the dangling string with bells attached to it, or anything else you want and you have made the Ho Ho Howdy Hat

Code

#include <Adafruit_NeoPixel.h>
#define echoPin 2  // attach pin D2 Arduino to pin Echo of HC-SR04
#define trigPin 3  // attach pin D3 Arduino to pin Trig of HC-SR04

#define pixelPin 10  // Defining pixel pin
#define pixelNum 16  // Defining number of LEDs on pixel strip

#define WHITE (255, 255, 255)
#define RED (255, 0, 0)
#define GREEN (0, 255, 0)

int distance;  // Defining variable for the distance measurement

// Defining Pattern Enum
enum patternType {
  ONE,
  TWO,
  THREE,
  FOUR,
  FIVE,
  SIX
};
enum patternType pattern;  // Defining variable for the pattern type

Adafruit_NeoPixel pixels = Adafruit_NeoPixel(pixelNum, pixelPin, NEO_GRB + NEO_KHZ800);

void setup() {
  pixels.begin();
  Serial.begin(9600);        // Setup for Serial Monitor
  pinMode(echoPin, INPUT);   // Sets the echoPin as an INPUT
  pinMode(trigPin, OUTPUT);  // Sets the trigPin as an OUTPUT
}

void loop() {

  updateSensor();   // Updating the Ultrasonic Sensor reading
  updatePattern();  // Updating the pattern with new distance
  //displayPattern(pattern);

  switch (pattern) {
    case ONE:
      for (int i = 0; i < 16; i++) {
        pixels.setPixelColor(i, pixels.Color(0, 255, 255));
      }
      pixels.show();
      break;
    case TWO:
      for (int i = 0; i < 16; i++) {
        pixels.setPixelColor(i, pixels.Color(255, 0, 255));
      }
      pixels.show();
      break;
    case THREE:
      for (int i = 0; i < 16; i++) {
        pixels.setPixelColor(i, pixels.Color(0, 255, 0));
      }
      pixels.show();
      break;
    case FOUR:
      for (int i = 0; i < 16; i++) {
        pixels.setPixelColor(i, pixels.Color(255, 255, 255));
      }
      pixels.show();
      break;
    case FIVE:
      for (int i = 0; i < 16; i++) {
        pixels.setPixelColor(i, pixels.Color(255, 0, 0));
      }
      pixels.show();
      break;
    case SIX:
      for (int i = 0; i < 16; i++) {
        pixels.setPixelColor(i, pixels.Color(0, 0, 255));
      }
      pixels.show();
      break;
  }
}

void updateSensor() {
  // Setting the trigPin LOW (INACTIVE) for 2 microseconds
  digitalWrite(trigPin, LOW);
  delayMicroseconds(2);

  // Setting the trigPin HIGH (ACTIVE) for 10 microseconds
  digitalWrite(trigPin, HIGH);
  delayMicroseconds(10);

  // Calculating the distance
  distance = pulseIn(echoPin, HIGH) * 0.034 / 2;  // Speed of sound wave divided by 2 (go and back)

  // Displays the distance on the Serial Monitor
  Serial.println(distance);
}

void updatePattern() {
  if (distance < 36 && distance >= 0) {
    pattern = ONE;
  } else if (distance < 72 && distance>=36) {
    pattern = TWO;
  } else if (distance < 108&&distance>=72) {
    pattern = THREE;
  } else if (distance < 144&&distance>=108) {
    pattern = FOUR;
  } else if (distance < 180&&distance>=144) {
    pattern = FIVE;
  } else {
    pattern = SIX;
  }
}
Group 13

Ho Ho Howdy Hat

Introducing the “Ho Ho Howdy Hat” – the ultimate fusion of holiday cheer and Western flair! Unleash your inner cowboy and light up the dance floor with this one-of-a-kind e-textile creation. Our Cowboy Santa Hat combines the coziness of a Santa hat with the rugged style of a cowboy hat, adorned with interactive LEDs that respond to your every move. Twirl, jump, or groove to the music – the built-in ultrasonic sensor detects your distance from the floor and adjusts the dazzling light show accordingly. The Ho Ho Howdy Hat is perfect for festive gatherings, country-themed parties, or anyone looking to stand out on the dance floor. So why wait? Giddy up and grab your Ho Ho Howdy Hat today, and let the festivities begin!

Ultrasonic Sensor
Ho Ho Howdy Hat
Milena's Low-Fi Prototype

The Ho Ho Howdy Hat is designed to bring joy, excitement, and a unique twist to holiday celebrations, country-themed events, and casual gatherings. Its innovative technology adds a dynamic visual element to any dance floor, creating unforgettable memories for the wearer and onlookers alike.

The Ho Ho Howdy Hat is designed to bring joy, excitement, and a unique twist to holiday celebrations, country-themed events, and casual gatherings. Its innovative technology adds a dynamic visual element to any dance floor, creating unforgettable memories for the wearer and onlookers alike.


Step-by-Step Guide

Tools and Supplies

Steps

Step 1: Test Your Components

Before starting the assembly, ensure that the ultrasonic sensor and the LEDs work correctly with the Arduino Uno and the breadboard. This step helps identify any issues early on and saves time during the build process.

Step 2: Prepare the Hat

Cut two holes large enough for the ultrasonic sensor to fit into the front of the hat. These openings will allow the sensor to detect distances accurately. Make a large incision at the front base of the hat, just above the brim, and another incision at the back to thread the wires through later.

Step 3: Soldering the Electronics

Begin by soldering wires, the ultrasonic sensor, and the LEDs to pin headers. Then, solder these components onto the perfboard. This approach eliminates the need for a breadboard to attach to the hat and streamlines the design.

Step 4: Attach the Arduino and Battery Pack

Secure the Arduino Uno and the 6-pack battery holder to the rear of the hat. Ensure they are firmly attached and well-balanced for comfortable wear.

Step 5: Hide the Wires

Thread the wires from the ultrasonic sensor through the incision at the front base of the hat to conceal them. Pass the wires from the perfboard and the connections to the Arduino Uno through the incision at the back of the hat.

Step 6: Connect the Battery Pack

Connect the battery pack to the Arduino Uno to provide power to the electronics.

Step 7: Add LED Strips

Wrap the Neopixel LED strips around the buckle of the hat. Slip the wire needed for connection to the Arduino Uno into the slit at the front of the hat and out of the slit at the back. Make sure the LED strips are evenly spaced and securely attached.

Step 8: Customize Your Hat

Add accessories to personalize your Ho Ho Howdy Hat. Consider attaching a dangling string with bells or other festive ornaments. Get creative and make your hat truly one-of-a-kind.


Behind the Scenes

Group 9’s pet toy project

Design brief

Our pets are people too. Our aim is to design our own Arduino based interactive pet toy.For this project, we decided that our product would be designed for cats, due to our extensive research. This product will aim to encourage playing with toy and having fun, improve the pet’s overall health, discourage behaviour problems which result from boredom and excess energy, and to offer mental and physical stimulation and enrichment. The product must:

  • Be made from materials that are safe and suitable for pets
  • Ensure the pet does not get bored of the product by implementing variety
  • The toy must help resemble the action cats of hunting or catching prey in order to maximise interest
  • Easy to use for both owner and pet
  • The product is durable and is stable enough to stand freely

Design blog

Meeting 1 (14.11.22) – Week 8

During this meeting, we viewed and evaluated all the design briefs available, and decided that the “Pet Toys” one was most suited to us. We then began to research into our chosen area in order to begin thinking about design considerations and concepts. We also decided that it was most suited to design our product for cats. The research conducted is shown below:

Research

The rate at which owning domestic cats worldwide is increasing rapidly, especially due to the recent pandemic and lockdown. According to a Cats and Their Stats 2021 UK report, there are 10.8 million pet cats in the UK, with 26% of households owning at least one cat. The pandemic, not only encourage people to buy pets, but the after effects means that people now stay at home more. Due to this, they spend more time with their cats, requiring forms of entertaining their cat. This has caused the cat market to increase every year, where it is now estimated that the global pet toy market will reach $3.7 billion by 2027, a 5.8% CAGR increase from $2.5 billion in 2020.

Cats are animals that can get bored quickly, therefore, designing a toy for them requires extra thought. Research shows that most cats prefer a toy that resembles prey such as mice, birds, bugs, and snakes. We instantly found that movement is an extremely important factor in toys, as cats love to chase prey. Due to this, we decided that our toy must resemble what it is like for a cat to hunt, as it is more likely all cats will be interested in this toy, and remain interested. Cats can get bored of playing, but they will not get bored of what they think is hunting. In one study, cats presented with the same toy three times, became progressively less interested. However, when they were provided with a new toy, they showed more response and were more willing to play with the toy. This lead us to think of toys that would be different every time the cat plays with it, for example, adding aspects of randomness, alternative appearances, and changing noises. In doing this, the cat would be less likely to become bored of the toy, which then makes it useless to the owner.

“The patterns of behaviour are similar, and the things that entice cats to hunt also get them excited about toys” … “What we see from research is that the more similar to realistic prey the toy is, the more of a response the cat shows.”

Mikel Delgado

One increasingly common factor that causes pet toys to fail on the market is how safe they are for the pet. Recently, there has been an increase in the reports of miliary dermatitis in cats, a skin condition caused by materials such as PET, PETE, HDPE, LDPE, PVC, PP, and polycarbonate, which are often used in pet products. This has caused owners to become more observant to the material choice before purchasing a pet toy. This is not the only health and safety risk to pets, as the RSPCA warn owners about toys which include string, rubber bands, paper clips, plastic bags, and toys with small parts. This is due to the risk of choking, suffocation, ingestion, or any other types of injury that must be avoided. When designing our product, we must ensure that it is safe for cats to use, by following advice given by the RSPCA, and use materials that are suitable for all pets.

Meeting 2 (17.11.22) – Week 8

Now that we had a greater idea on the area of pet toys, and who we were designing for, we began sketching and modelling potential ideas. We then evaluated them, looking at their advantages and disadvantages, which assisted us in developing a final design. We created a few concepts, evaluated them, then created a final design which is all shown below.

Design 1 – Randomised laser

Advantages:

  • Would be very fun for cat to chase
  • User does not have to hold laser
  • Red light resembles a “bug” which is suitable for cats
  • Simple mechanism, hardware, and code

Disadvantages:

  • User may want to control laser, especially in closed spaces
  • Large size for basic function
  • Not the most ambitious concept
  • Laser could potentially damage eyes

Design 2 – Spinning feather wand

Advantages:

  • Creates movement which pet will enjoy
  • User does not have to hold or control toy
  • Extremely simple mechanism, hardware, and code

Disadvantages:

  • User may wish to control feather wand
  • If the pet holds onto the feathers, product could topple over
  • Feathers could break
  • Not ambitious enough

First final design – Remote control mouse

Advantages:

  • Resembles prey which will interest cat
  • User can control movement
  • Ambitious design due to controller

Disadvantages:

  • Similar products on market
  • Cat may get bored due to repetition
  • Would have to be large due to part dimensions

As we thought this was going to be our final design, we created a low fidelity prototype win order to gain a better understanding on dimensions and functionality. This helped us to see where and how this idea was not going to work, and why it was better to re group and evaluate the design.

Meeting 3 (21.11.22) – Week 9

After careful consideration, we decided that this final design was not suitable as there were many similar products on the market. In addition to this, we believed that a cat would quickly become less interested in this product, as it did not follow our design brief and research. Having done this, we then had to quickly develop a new final design which covered all design brief points, with little disadvantages. Once we had a new design, we prepared sketches and researched into how to make the idea possible.

Final design: Remote control pointer

Advantages:

  • User can control movement
  • Pointer can move laser, feather want, or any other toy
  • Ambitious design
  • Cat will not get bored due to the toy changing

Disadvantages:

  • Large design
  • User has to own laser / wand separately

Meeting 4 (22.11.22) – Week 9

We continued our research into parts and mechanisms for our idea to work efficiently. After confirming this new idea, we created a full scale low fidelity prototype using cardboard. This helped us to explore dimensions, structure, aesthetics, and how to make it as functional as possible.

Meeting 5 (28.11.22) – Week 10

Once we knew exactly what we needed to assemble this product, we ordered our parts (Host shield, USB Bluetooth dongle, and a pan-tilt HAT). Whilst we didn’t have our parts, we prepared sections of the code and tested elements of the design that we had parts for. For example, we were able to use two servos to test the vertical and horizontal rotating mechanism.

Meeting 6 (5.12.22) – Week 11

Out of the three parts we ordered, only the host shield arrived, therefore, we were unable to begin assembling our product. Instead, we continued working on the code so that when the parts arrived, only the assembly was required. We tested that the host shield was working fully with our Arduino uno and an LED, which were already available to us.

Meeting 7 (8.12.22) – Week 11

On this day, all of our parts arrived, therefore, we were able to begin testing the parts to ensure they were working, as shown in the “Testing conducted” section. To hold the circuit, we decided to place the board in the base of the product. In order to make it durable and aesthetically pleasing, we decided to use MDF, to create a boxed shape base. MDF is also safe for pets, following our design brief points. We also found that part of the host shield needed soldering, therefore, we were able to use the soldering kits in lab to complete this.

Meeting 8 (11.12.22) – Week 11

As we had all the necessary parts, we began assembling our product. With small refinements to the code, we were able to connect the parts to the completed code, and test that everything worked correctly. We then showed our product to various people for feedback, whilst adding final touches to the design.

Meeting 9 (12.12.22) – Week 12

PRESENTATION!!!

Project task list

Task to completeWhen?Who?
Research area to create briefWeek 8 Yaseen
Sketch initial concepts Week 8All members
Develop concept into final designWeek 8All members
Create prototype Week 9Ouafi
Order partsWeek 10All members
Writing codeWeek 10Yusuf
Assemble parts and test with codeWeek 11All members
User feedback and final touchesWeek 11All members

We followed this project task list throughout the full process, however, due to us altering our final design following further evaluation, there were more steps that were not included in this task list. These tasks are shown below:

Research parts Week 9Yusuf
Sketch new designWeek 9Yaseen
Create new prototypeWeek 9Ouafi

Maker manual

Final outcome

Final outcome in automatic mode, where the servos move randomly, at random intervals.

Tools and supplies used

  • Arduino software
  • Pan-tilt, consisting of 2 servos
  • 1x host shield
  • 1x USB bluetooth dongle
  • 1x controller + it’s charging cable
  • Soldering station
  • Laptop
  • Connector cable

In order to create the base of the product, in addition to the holder for the toy, we had to go to the Makerspace, as we required materials and tools including:

  • MDF sheet
  • Hot glue gun
  • Scroll saw
  • Hand saw
  • Sanding machine
  • Rectangular file
  • Screws
  • Screwdriver

Circuit layout

How we built this product

Below describes the steps we took to build the circuit for our product:

  1. Order parts including: 1x host shield, 1x pan-tilt, 1x usb dongle
  2. Attach host shield to Arduino UNO Board
  3. Connect the 5V pin on the host shield to the power rail on the breadboard
  4. Connect the GND pin on the host shield to the ground rail on the breadboard
  5. Attach a wire from the ground rail on the breadboard to the ground (brown) wire on the servo
  6. Attach a wire from the power rail on the breadboard to the 5v (middle/ red) wire on the servo
  7. Attach a wire from pin 9 on the host shield, to the signal(orange/ yellow) wire on the servo
  8. Repeat steps 5,6, and 7 for the other servo on the pan-tilt, but ensuring a different pin is used in the host shield

This diagram shows how the base that holds our circuit was built:

The full product was then finalised by combing the circuit with the holder by screwing the pan-tilt onto the top of the holder, creating durability and stability.

Code

Code for automatic mode:

Code for controller mode:

Testing conducted

Testing that the host shield was working:

Testing the servo pan tilt with host shield:

Testing controller connected to board using the serial monitor:

Testing controller with pan tilt servos

Shortcomings and evaluation

As shown in the testing conducted section, we managed to get both servos in the pan-tilt working at the same time. However, once we connected the controller to the board, we found that only one servo moved at a time. After research into the reason for this, we found that the maximum of 5 volts on the Arduino Uno was not sufficient to power both servos in addition to the controller. As there was a delay due to Royal Mail strikes for the arrival of our parts, we began assembling later than we would have liked. Due to this, there was no time for us to order and get the parts on time to make our initial concept possible.

When designing and ordering our parts, we aimed for the user to control the movement of the servos using a controller. To improve this further, we decided it would be ideal for the controller to be wireless, which lead us to order a USB Bluetooth dongle. Despite attempting this method of connecting the controller to the board multiple times, we unfortunately did not manage to make it work, meaning we had to connect the controller using a cable. This meant the product had another cable to store in the holder, however, we didn’t design the hole in the holder for an additional wire.

When creating the MDF holder for our boards, we did not take into consideration us having to have a wire for the controller, as we initially wanted it to be wireless. Due to this, the wire could not fit through the whole we created, hence some wires had to be connected through the bottom of the casing. This design does not look like what we wished, however, it is still functioning and looks neat from the front. In addition to this, after connecting the controller to the host shield, it initially worked. However, after longer use we found that it would often not work properly and was extremely inconsistent, despite everything being connected properly.

Despite these shortcomings, we believe that our product is still suitable for users to entertain their cats, especially while using the automatic mode. The outcome still covers all our design brief points, as our research showed cats were still very interested in playing with the toy, without the user having to use much effort whilst it was moving automatically. We believed that despite the product being very simple, the product is actually very efficient and useful for many users.

If we were to repeat this project in the future, there would be many things we would do differently. The first mistake which we could have easily avoided with better preparation is when we used only the Arduino Uno as a source of power when it wasn’t enough. With more time, we could have ordered an external power source and use that instead of, or with, the 5 volts that the Arduino Uno provides. In doing this, the product would be able to function as we would have liked by the user being able to control both servos at the same time with a controller. Another mistake which could have resolved with more time would be the design and fitting of the case. As our parts arrived very late, we were forced to carry out many of our tasks within a short amount of time, including the making of the holder which was not sized correctly. An easy solution could have been easily producing another holder, but taking into consideration additional wires and dimensions. The last alteration we would have made was the method of controlling the servos. Instead of using a controller, we could have ordered an IR receiver, and used an infrared remote, which would have been a lot simpler than using a controller. Due to this, there would have been a lower chance of failure, whilst still allowing to control the servos away from the product.

GROUP 2 – REFLECTION PROTECTION

Project Index

Press Buttons to Jump to the section:


Chosen Project Brief: Being able to check on the security of your home, family members and belongings while away and in various locations around the world is of interest to you not only from the security perspective but also to ensure safety and peace of mind. The camera is the most component device that is used nowadays to ensure you capture any abnormalities or intruders but recently radio signals, voice and also heat have been used to complement or replace the camera. For this project, we encourage you to start thinking of a simple, low-effective home security system with the camera not being the centre of it. You could use microphones, infra-red sensors and also wireless shields to be able to detect movements, presence and also changes in the home environment from a distance through a website or phone app. Remember to be creative but also realistic considering the time available and budget.

Project Overview:

Design Direction:

We have chosen to create a Laser Sensor alarm system with a laser beam spanning our prototype. We will use a box to mimic a room/corridor through which the beams will pass. The beam will be pointing at a photoresistor which detects when the beams are broken. Once an object or person obstructs the beams, the system will be triggered, and audio feedback will let the user know. We want the system to be easy and intuitive to use. To do this, we will provide clear and visual instructions for the user. These instructions will include images or graphics for easy understanding.


Features:

  • Red laser beam bouncing from small mirrors to an LDR
  • Security alarm sound when there is a security breach or interference with laser
  • Phone notification SMS when a security breach occurs
  • Remote control of system via phone App

Project Planning:

Research:

Images can be clicked on like hyperlinks to check out reference website.


“The world has changed, particularly in California, where there has been a huge increase in robberies and burglaries”

Mauricio Umansky, founder and CEO of luxury real estate brokerage The Agency

Git Security:


Market Research:

Product 1:
20M Door Single Beam Alarm Photoelectric Infrared Detector Home Security System
Product 2:
Dahszhi Dual Laser Detector Alarm Beam Sensor Indoor 300m Outdoor 60m Infrared Detector

Brain Storming:


Inspiration:

We took most of our inspiration from movies and TV shows featuring laser sensor alarms. For example Kim Possible and Oceans 12.


Gantt Chart:

Preliminary Project Plan over the span of the available weeks.


Project Task List:


Project Phase Blog:

  • Phase One: Project Ideation, Sketching and Lo-fi Prototypes
  • Phase Two: High-fi Prototype and Building
  • Phase Three: Testing and Final Iterations

PHASE ONE: Project Ideation, Sketching and Lo-fi Prototypes

WK9:

Low-fi prototype (Sketch Model and Sketching):

We focused on working through how we wanted our project to look. Using a box would be easier than setting the system up within an actual room, as we felt the performance would be demonstrated best if we could fix each component within a box. The box would act as a prototype for a ‘room’. We played with the idea of a corridor-type room with multiple beams.


WK10:

Main Goals/Week Checklist:

Lo-fi prototype using Laser and Photo-resistor

Component’s Arrive – Preliminary Testing. Since the Wifi shield had not arrived yet we focused on what we could with the laser having arrived. We created a test/preliminary version of our alarm system using a photo resistor and one of our lasers.


Testing Photo Resistor – Laser interaction – We created this test function which detects whether the laser is pointed at the photoresistor or not by testing the light level value which it reads. This then sets off the piezzo noise function below.

Creating Test Alarm Noise – In this session, we created test alarm noises. We want the alarm noise to be annoying so that the intruder who set the alarm off is deterred. We wanted the sound to consist of one high-pitch (high frequency) and low-pitch (low frequency) notes. This is what helped us to achieve a stereotypical alarm sound.


PHASE TWO: High-fi Prototype and Building

Room/Prototype housing planning

Two Housing Options – Front Open Box Vs. Corridor Box

We decided on the corridor box as we felt it would present better and demonstrate our system from all angles. This way, the system could be used from both sides, therefore, mimicking someone walking through the system better.


Maker Space Making:


WK11:

Main Goals/Week Checklist:

Wifi-Shield Arrives: We had to wait till a week to start experimenting and learning how to use/setup our wifi shield. In order to use and test our system using the shield there was a lot of set-up steps.

Concerns/Issues:

Wifi-Shield: One problem with the wifi shield was that once one group member had set it up on their laptop, it was difficult to make sure another member had all the relevant downloads and accounts for testing to be done by multiple members. This raised some issues as updates were not as clear to recognise as we had thought. Another issue we had was with the connection from the shield to our phones, and we had some technical difficulties with this.

Photo-Resistor Threshold: Our main concern was that the photoresist threshold was too high; therefore, the alarm was not triggered in light spaces. We discovered this issue after working in a room with large windows and finding our alarm was only being set off when we covered it with our hands.


We created and adapted our old detection function to add our new notification feature. This feature means that we get a text notification when a security breach is detected.

This was the hardest part of our project, which was connecting the board to our phones on an external app and sending an SMS.


Adding Mirrors:

We used mirrored acrylic to create the mirrors. Mirrored acrylic is easier to work with than real glass mirrors and safer – we could cut it to size on the bandsaw and did not have to worry about sharp edges. We wanted the laser to span the entire corridor length; therefore, we decided to use 5 mirrors. Initially, we were only going to do 3, but we needed more because we wanted the mirrors to sit flush to the sides instead of tilted. Instead of tilting the mirrors, we tilted the laser to reach the end of the corridor where the photoresistor would go. Pictured on the left, we are trying out the mirror positions to cut the hole for the photoresistor.


Adding decoration:

We wanted to make the corridor look more realistic so that one could imagine this being in real scale. We used random recycled materials such as foil bottle caps and yoghurt lids to make the mirrors look like picture frames. We also added a carpet to the bottom.

Lining up the Laser:

This proved to be difficult as with all five mirrors, each micro-movement of the laser effecting its reaching the LDR at the final point.


PHASE THREE: Testing and Final Iterations

During the final testing and iteration group session, we discovered some issues with the alarm’s sensitivity and therefore began testing the dark. We found that either testing in the dark or adding a ‘roof’ to the setup made the system much more effective.

At the beginning of our testing session, we realised we wanted to have the alarm continuously ringing after it is triggered. This was difficult because using external libraries meant we couldn’t call certain functions as we struggled to have the recursive functions. We struggled with having these functions running simultaneously so that the alarm would remain ringing once the beam had been triggered until turned off on the app.


Testing: Ginger Bread Man

We made a gingerbread man for our demonstration and for testing purposes. This allowed us to test the reactiveness. We debated on whether to keep the alarm on or off after the initial trigger for a more realistic alarm system.

Project Evaluation:

Known Shortcomings:

  • Possible Transportation Issue: One known issue is that the laser position is very sensitive. Therefore any slight movement in the laser will affect the position at which the laser hits the LDR. This could affect the LDR sensitivity and, therefore, the reactiveness of the alarm trigger.
  • Predictable Laser beam line: Because the laser beam line is pretty regular (bouncing from just one mirror to another with a relatively even distance and angle), intruders could avoid the laser in order to overcome the security system.

Future Considerations:

  • Allow to laser to be deactivated when alarm is not in use
  • Add more complex laser layout.
  • Connect the circuit to an external power source
  • Use a laser receiver instead of an LDR for greater accuracy

Working as a Team: As a group we managed our responsobilities fairly and made sure all members had full understanding of the project and project code. We communicated via WhatsApp and met numerous times during the duration of the project.

Time management: Our time management was fair on this project but due to the unforeseen circumstance of our wifi shield only arriving during week 11 we were unable to work on the most difficult part of our project. This stunted our progression through the project as up to that point we were restricted in what we could implement.

Overall evaluation of final project: Overall we were very happy with the way our final outcome looks. We felt that over the process we learnt a lot and that we worked well as a team of four.

User and Builder Guides:

In this section you will find:

  • Component inventory
  • Wifi-setup guide
  • Builder Guide
  • User Guide

Component Inventory:

Wifi Set-up:

Builder Guide:

User Guide:

Code and Implimentation:

//Use blynk app to switch alarm On and off 
//sends a text message to given number

//import statements
#define BLYNK_PRINT Serial
#define BLYNK_TEMPLATE_ID "TMPLQL0hNolE"
#define BLYNK_DEVICE_NAME "alarm"
#define BLYNK_AUTH_TOKEN "7iJcLyZf42H38Co9xcOe05FWA4pf89lB"

#include <SPI.h>
#include <WiFiNINA.h>
#include "arduino_secrets.h" 
#include <BlynkSimpleWiFiNINA.h>

//connection for SMS system
char ssid[] = SECRET_SSID;
char pass[] = SECRET_PASS;
String ifttt_webhook_key = SECRET_IFTTT_WEBHOOK_KEY;

//connection for alarmOn and alarmOff
char auth[] = "7iJcLyZf42H38Co9xcOe05FWA4pf89lB";
int status = WL_IDLE_STATUS;
const char* host = "maker.ifttt.com";
WiFiSSLClient sslClient;

//global variables dictating pin locations
int buzzPin = A2;
int sensorPin = A1;

//globals for storage of information
int sensorVal = 0;
int alarmOn= 0;

//pin value is changed using Blynk App
int pinValue;


void setup() {
  Serial.begin(9600);

  pinMode(buzzPin, OUTPUT);
  pinMode(laserPin, OUTPUT);

  wifiSetup();

  Blynk.begin(auth, ssid, pass);
}

void loop() {
  //statement checks for pinValue state and on change runs BLYNK_WRITE(V0) method
  Blynk.run();

  //conditional logic structure checking whether the alarm is on and whether the alarm has gone off
  if(pinValue == 1 && alarmOn == 0){
    breachDetection();
    Serial.println("alarm is checking for breach");
  }
  else if(pinValue == 1 && alarmOn == 1){
    alarm();
  }
  else if(pinValue == 0){
    alarmOn = 0;
  }
}

BLYNK_WRITE(V0){
   pinValue = param.asInt();
}

void breachDetection(){
  //reading sensor value and checking if beam has been disturbed
  sensorVal = analogRead(A1);
  if (sensorVal < 1000) {
    //triggered once, sends notification once and changes the alarm state to on
    alarmOn = 1;
    sendNotification();
    Serial.println("notification sent!");
    return;
  } 
  else {
    noTone(buzzPin);
  }
}

//mthod sotring alarm frequency controls
//will be called continuously until alarm is turned off if  a breach has occured 
void alarm() {
  tone(buzzPin,520);
  delay(400);
  noTone(buzzPin);
  tone(buzzPin,3000);
  delay(400);
  noTone(buzzPin);
}

//method to send an SMS to given number attatched to webhook account
void sendNotification(){
  // connect to web server on port 443:
  if(sslClient.connectSSL(host, 443)) {
    // if connected:
    Serial.println("Connected to server");

    // make a HTTP request:
    sslClient.println("GET /trigger/alarmOn/with/key/" + ifttt_webhook_key + " HTTP/1.1");
    sslClient.println("Host: maker.ifttt.com");
    sslClient.println("Connection: close");
    sslClient.println();
    Serial.println("IFTTT request Sucessful");
  }
   else {
    Serial.println("IFTTT request failed");
  }

  // if there are incoming bytes available 
  // from the server, read them and print them
  while(sslClient.connected()) {
    if(sslClient.available()) {
      char c = sslClient.read();
      Serial.write(c);
    }
  }

  Serial.println();
  Serial.println("disconnecting from server.");
  sslClient.stop();
}

//connects to the wifi network on the setup function
//network name and password are stored in arduino_secrets.h tab
void wifiSetup() {
  // attempt to connect to Wifi network:
  while ( status != WL_CONNECTED) {
    Serial.print("Attempting to connect to Network named: ");
    Serial.println(ssid);                   // print the network name (SSID);
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
    status = WiFi.begin(ssid, pass);
    // wait 10 seconds for connection:
    delay(10000);
  }
  // you're connected now, so print out the status
  printWifiStatus();                        
}

//used for debugging wifi connection
void printWifiStatus() {
  // print the SSID of the network:
  Serial.print("SSID: ");
  Serial.println(WiFi.SSID());
 
  // print WiFi IP address:
  IPAddress ip = WiFi.localIP();
  Serial.print("IP Address: ");
  Serial.println(ip);
 
  // print the received signal strength:
  long rssi = WiFi.RSSI();
  Serial.print("signal strength (RSSI):");
  Serial.print(rssi);
  Serial.println(" dBm");
}
#define SECRET_SSID "Galaxy Note20 Ultra 5G"
#define SECRET_PASS "plzdonthackme"
#define SECRET_IFTTT_WEBHOOK_KEY "cXsYrTYZN21y4FGCu38Rw5"

//this tab stores the wifi network name, password and webhook key
//webhook key is found on you webhook device account
tab storing the wifi network name, password and webhook key //webhook key is found on you webhook device account

Group 1: Escape Room Game Treasure Hunt

Upon successful completion of your last task, you were given an RFID tag. You must place this tag on the scanner inside the treasure box to start this game. In this game, there are 3 levels you must complete. In each level, you will be presented with a riddle you must solve. After you have solved all 3 riddles, you will find a key inside the treasure box that will allow you to start the next game in the escape room.

Prototyping

2-D Prototype: The top image represents the display board and the interactive board. On the display board, the user sees the riddle and the 3 LED lights that indicates which levels they have completed. The interactive board is where the user completes each level. We use three different components for each level: buttons, potentiometers, and sensors. On the top left corner is the scanner, where the user taps their RFID tag to begin the game. The bottom image represents the hidden components within the cardboard box (i.e. the brain of the game). This contains the breadboard and Arduino Uno. Additionally, the key is hidden within the box as well, and is only shown when the user completes the game. Upon completion, the servo rotates 90 degrees to unlock the box so the the user can retrieve the key.

3-D Prototype: As you can see below, we built a physical prototype of what our final design would potentially look like, for the purposes of making sure all of our components can fit in the cardboard box. On the top is the display, where the riddle is shown. On the bottom is the interactive board. The user must flip the covering to reveal the light sensors. The user must press the 3 buttons in a certain order. And finally, the user must adjust the potentiometers to be at a certain degree.

Digital Prototype: On the left is the basic design of the escape room game, where the user interacts with the User Interaction Board and the Riddle and Level Display. The backend is contained within the treasure box, which the user is unable to see. This includes the wires, breadboard, and Arduino. Additionally, the Lockbox is hidden inside the treasure box, and only revealed to the user once they complete the game. On the top right corner is the Riddle and Level Display. When the user receives the RFID tag from the previous game, they must scan it on the top left corner. There are 3 LED lights that indicate to the user which level they are on, as well as the successful completion of each level. For example, the first light will light up after the user completes the first level. Additionally, there is a screen that contains the riddle for each level. And on the bottom right corner is the User Interaction Board. On the top left corner, there is covering that reveals a single light sensor. Below it are 3 buttons. On the right, there are 2 potentiometers. These 3 interactive features represent the 3 levels of the game. For example, the first level requires the user to interact with the buttons.

Project Timeline

Week 9We created 3 types of prototypes: a 2D model, a 3D model, and a digital model. Details of all prototypes are described above in the design blog.
Week 10We ordered our external tool, an RFID tag and scanner. We were also able to find a display screen in the “junk” pile. Additionally, we wrote pseudocode to run our program, as well as compiled all the internal tools we needed, including different types of wires, potentiometers, LED lights, and light sensor.
Week 11The external components we ordered arrived this week, so we tested the RFID scanner and LED display screen to work individually. Once we got them functional and understood the functions of the code syntax, we implemented them into our project’s code. After compiling the code to ensure that each level of the game worked and each component was functional in regards to the game, we built the physical infrastructure for our game. This included using a cardboard box to contain the breadboard and Arduino. We cut holes in the cardboard to fit the LED lights, buttons, and potentiometers.
Week 12In the last week, we tested our game to make sure everything worked by putting ourselves in the shoes of users. We even had some other students who were non-technical to play our game in order to receive user feedback, which we incorporated into our final design.

Project Tasks

KatherinePrototyping 
Documentation and Design blog
PeterCode 
Testing
NickCode
Testing

Maker Manual

Overview

Below is the final product of our escape room game! It differs slightly from our prototypes, such that we decided against the hidden key box and Servo required to open it at the end of the game. Instead, we chose to show that the user won on the display screen. Additionally, we moved the scanner from being shown on the outside of the box to inside the box, due to wire length restraints.

To begin the game, the user must tap the RFID tag to the scanner on the side of the box. The game will then begin by showing the first riddle on the display screen. To complete the first riddle, the user must press the first button 5 times, the second button 1 time, and the third button 1 time (this is the module number!). After successful completion, the second riddle is prompted on the display screen. To complete the second riddle, the user must turn the top potentiometer to the right, and the bottom potentiometer down. Once this is complete, the final riddle will appear on the display screen. In order to solve the final riddle, the user must lift the covering on the board to reveal a light sensor. Once all three levels are solved (in consecutive order), the user has won, which will also be displayed on the screen.

Components

  • Arduino Uno, breadboard, wires, resistors 
  • 3 LED lights (to indicate level of completion)
  • RFID (for user to begin game)
  • Cardboard box 
  • Screen (to display riddles for user)
  • 1 Light sensor
  • 3 Buttons
  • 2 Potentiometers

Breadboard Layout

Build

Most components needed for this project were available to us in the electronics lab. We used one of the unused cardboard boxes as our escape room’s container, and only had to cut and tape some areas of it for parts of the game. The Arduino Uno, breadboard, and wires are all contained within the box, with a cardboard cover to hide it underneath the buttons, potentiometers, and lights. We attached the RFID scanner and the riddle screen to the top of the box. Most of the connections were straightforward and can be seen in the breadboard layout. However some of the wires needed to be stripped in order to properly connect to the buttons.

Code

#include <SPI.h>
#include <MFRC522.h>
 
#define RST_PIN         9          // Configurable, see typical pin layout above
#define SS_PIN          10         // Configurable, see typical pin layout above
 
MFRC522 mfrc522(SS_PIN, RST_PIN);  // Create MFRC522 instance
 
//libraries for display
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
 
//set pins
int ledPins[] = {6,7,8};
int potPin1 = A0;
int potPin2 = A1;
const int butPin1 = 3;
const int butPin2 = 4;
const int butPin3 = 5;
int photoPin1 = A2;
 
//set inital values for input
int potV1 = 0;
int potV2 = 0;
int butState1 = 0;
int butState2 = 0;
int butState3 = 0;
 
int s1=0;
int s2=0;
int s3=0;
 
int s1Done = 0;
int s2Done = 0;
int s3Done = 0;
 
int butc1 = 0;
int butc2 = 0;
int butc3 = 0;
 
int ll1 = 0;
int ll2 = 0;
 
//Declare display
LiquidCrystal_I2C lcd(0x27, 16, 2);
 
void setup() {
  Serial.begin(9600);   // Initialize serial communications with the PC
  while (!Serial);    // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4)
  SPI.begin();      // Init SPI bus
  mfrc522.PCD_Init();   // Init MFRC522
  delay(4);       // Optional delay. Some board do need more time after init to be ready, see Readme
 
  lcd.begin();
  lcd.print("Scan ID badge to    unlock game");
  // Turn on the blacklight
  lcd.backlight();
 
 
  //set pins as input or output
  pinMode(butPin1, INPUT);
  pinMode(butPin2, INPUT);
  pinMode(butPin3, INPUT);
 
 
  for(int i=0; i<3; i++){
    pinMode(ledPins[i], OUTPUT);
  }
}
 
void loop() {
  // Reset the loop if no new card present on the sensor/reader. This saves the entire process when idle.
  if ( ! mfrc522.PICC_IsNewCardPresent()) {
    return;
  }
 
  // Select one of the cards
  if ( ! mfrc522.PICC_ReadCardSerial()) {
    return;
  }
  Serial.println("scanned");
 
  //checks for failure
  if(s2Done == 2){
    s1Done = 0;
    butc1 = 0;
    butc2 = 0;
    butc3 = 0;
  }
 
  if(s1 == 0){
    lcd.clear();
    lcd.print("Clue 1: What module are we currently in?");
    stageOne();
    digitalWrite(ledPins[2], HIGH);
  }
 
  if(s2 == 0){
    lcd.clear();
    lcd.print("Clue 2: right,      then down");
    stageTwo();
   
  }
  if(s3 == 0){
    lcd.clear();
    lcd.print("Clue 3: One button  is different");
    stageThree();
  }
  finish();
 
}
 
void finish(){
   lcd.clear();
   lcd.print("Congratulations     You beat the box!");
}
 
void stageOne(){
  while(s1Done == 0){
 
    //check for button presses
    butState1 = digitalRead(butPin1);
    butState2 = digitalRead(butPin2);
    butState3 = digitalRead(butPin3);
 
    readButtonInput();
  }
  //check for failure state
  if(s1Done = 2){
    return;
  }
  //write to corresponding indicator LED
  else{
 
  s1 = 1;
  }
}
 
void failure(){
  //reset all button values
  s1Done = 0;
  butc1 = 0;
  butc2 = 0;
  butc3 = 0;
  //run stage one again
  stageOne();
}
 
void stageTwo(){
  while(s2Done == 0){
    //read potentiometer values
    potV1 = analogRead(potPin1);
    potV1 = map(potV1, 0, 1022, 0, 10);
    potV2 = analogRead(potPin2);
    potV2 = map(potV2, 0, 1022, 0, 10);
    Serial.println(potV1);
    Serial.println(potV2);
 
    //check for proper input
    if(potV1 == 8 && potV2 == 1){
      s2Done = 1;
    }
 
 
  delay(100);
  }
  //write to corresponding indicator LED
  digitalWrite(ledPins[1], HIGH);
  s2 = 2;
}
 
void stageThree(){
  while(s3Done == 0){
    //read light values
    ll1 = analogRead(photoPin1);
    Serial.println(ll1);
 
    //check for proper light values
    if(ll1 < 200){
      s3Done = 1;
    }
 
    delay(100);
  }
  //write to corresponding indicator LED
  digitalWrite(ledPins[0], HIGH);
  s3 = 3;
 
}
 
int readButtonInput() {
  unsigned long duration = 2000;
  unsigned long lastPress = millis();
  boolean firstPress = true;
 
  do {
    // get at least one press
    if (digitalRead(butPin1) == LOW) {
      Serial.println("press1");
      butc1 += 1;
      delay(300);
      lastPress = millis();
      firstPress = false;
    }
    if (digitalRead(butPin2) == LOW) {
      Serial.println("press2");
      butc2 += 1;
      delay(300);
      lastPress = millis();
      firstPress = false;
    }
    if (digitalRead(butPin3) == LOW) {
      Serial.println("press3");
      butc3 += 1;
      delay(300);
      lastPress = millis();
      firstPress = false;
    }
  } while(firstPress || (butc1 < 10 && butc2 < 10 && butc3 < 10 && millis() - lastPress <= duration));
 
  Serial.println(butc1);
  Serial.println(butc2);
  Serial.println(butc3);
 
  //check for failure state
    if(butc3 > 1 || butc2 > 1 || butc1 > 5){
      butc1 = 0;
      butc2 = 0;
      butc3 = 0;
      s1Done == 2;
    }
 
     //check for win state
    if(butc3 == 1 && butc2 == 1 && butc1 == 5){
      s1Done = 1;
    }
    delay(100);
  return;
}

Testing & Shortcomings

We tested each phase of the game separately. The first phase is scanning the RFID tag to begin the game. We used serial print statements to ensure that the tag initiated the game once scanned. We also tested to see if we could scan the tag if the scanner was placed inside the cardboard box. The second phase is the three levels of the game. We first ensured that each component (buttons, light sensor, and potentiometers) were working. We then tested that upon successful completion of each game, the display will show the riddle for the next level, and that the code switched to the correct case. The final phase is the finale of the game, where the user completes all 3 levels. We made sure that once the 3 LED lights were lit, the display will show that the user won.

In our initial prototypes, we were hoping to use a servo that would rotate 90 degrees to reveal the key inside the cardboard box. However, due to space constraints and reliability, we decided against using the servo. Instead, we chose to display a message on the screen, indicating that the user has won.

Additionally, you may have noticed that we changed the placement of some of our components, such as the 3 LED lights moved to the bottom left corner. This was due to the wire being too short, and we were not able to extend it to be at the top of the cardboard box.

GROUP 15 – DYNABOX

DynaBox

Escape Room Box Created to leave Users Puzzled

Group 15: Phil, Catalin, Ralu

350mm x 230mm x 90mm

Instruction Manual

The central switches are used to power on a specific puzzle, the top one is for the centre and left hand side, the other for the right hand side

Using the upper switch will power on the puzzle on the far left

To solve this puzzle the user must match the position of the shapes on the reference panel

Once this happens, the puzzle will be complete and the user will be able to play puzzle two

Puzzle two revolves around sequences. The four LEDs on the first stage indicate which button the user must press

After pushing the button – depending on input, the box will send a signal telling the user they are correct or incorrect

If the user solves all randomised sequences correctly, a tune is played and all LEDs flash in pairs

Puzzle three is a music puzzle. It is powered on using the lower switch

Listen to the tune it plays – each note corresponds to a button

The user must figure out what matches

The tune replays after approximately 3 mins

If the user inputs the correct code, a blue light is shown on the 3rd panel and a tune is played

Read more “GROUP 15 – DYNABOX”

Group 3- Your Own Talking and Loving Teddy Bear

THE CYBEARG – YOUR OWN MINI SECURITY SYSTEM

Imagine entering your home and your Teddy Bear greeting you with a welcoming message or with lighting up eyes. Also, it will be great if the Teddy Bear is not so welcoming to other members in the house (just for fun!). For this, you are encouraged to use an RFID tag and reader with a choice of tags one of them being your own hence Teddy realising it is you and delivering a friendly message! You need to use at least one other tag that is not yours and hence delivering unwelcoming messages and maybe red eyes! Remember, you do not have to use a real Teddy bear but you can use other prototyping options

DESIGN BLOG

THE MAKING PROCESS

Monday 21/11/22

Today we began the process of designing our Teddy Bear Robot. We began sketching out our initial ideas and planning out how we want to make our system interactive. The aim of today was to get rough idea of how we planned on creating a bear that reacts to external stimulus and then put our two different responses, one friendly, and one not so friendly.

We spent our first session brainstorming potential movements for the bear including ideas like a spinning head on a motor, red LED eyes, waving arms, a speaker that plays voices or an alarm, an RFID scanner and a motion sensor.

Monday 28/11/22

Having now come up with a concept and a rough plan of how to proceed, we began by finding the teddy that would become the main basis for the project. Once procured, we moved onto to dismembering our poor monkey and tearing it from limb to limb. We took measurements of the bear after removing its stuffing and started to make the frame that would house all the electronics and sit on the inside of the bear.

We also began scavenging recycled parts to use within the bear. Since our initial design was quite broad, we knew we would be able to change aspects of the bear based on what we were able to find. Among the recycled parts, we found an old LCD screen, many different sized servos, a speaker, and many other small parts.

We then began wiring up all these found parts and finding code to test them. It took a lot of trial and error and we soon found out the speaker was broken, the LCD was able to turn on but couldn’t display any writing and around half the servos worked.

Using the bigger servos that did work, we redesigned the bears moving arm using the more powerful servo and some metal spindles from a broken umbrella.

Monday 05/12/22

This morning we received the new components we ordered, including the RFID scanner, the speaker and LCD screen and began testing them and figuring out the code for the parts individually. Unfortunately, we couldn’t get the RFID scanner to work after countless tries and hours of working. Also, we began facing an issue where whenever we tried to power the servo using a 9v battery instead of being plugged directly into a laptop. After plugging the servos back into the laptop, they no longer worked so we spent a lot of time trying to get everything to work again.

We also tested the motion sensor and found it wasn’t very sensitive, the sensor would go off at incorrect times and sometimes wouldn’t work at all. Luckily after a day full of setbacks we at least got the speaker and LCD working.

Tuesday 06/12/22

We managed to finally fix the servos and began making a new arm mechanism out of some recycled thin, lightweight acrylic instead of the metal spindle in case it was the weight of the arm that kept making the servo break. We also used some tiny screws to hold it together as everything had been previously kept together using masking tape.

Sole also got the RFID scanner working after reinstalling Arduino and restarting the program. Now that we had all the parts tested individually we needed to arrange them within the bear.

Wednesday 07/12/22

Everything is finally beginning to come together. All the individual components have been working separately so we have begun moving everything onto one Arduino board and planning out how all the components are going to fit within the bear.

We also found that the speaker was very quiet so we worked on trying to improve the volume by trying to add a transistor into the circuit which should increase it. We also stared to write new code that merges all the existing code we wrote for the original parts. This included a series of IF statements that cause the LCD screen and the LED eyes to react when the RFID scanner is activated.

We have also been testing as many card as we can on the RFID scanner, we have found that things like apple pay are scannable by the scanner and we can elicit a response from this action. We’ve also tried Oyster cards, hotel cards, our university key cards and other things.

As well as this, the speaker has been stitched into the right leg of the bear.

However, a big issue has emerged. The two libraries that we need to use for the servo and the LCD screen are clashing. Whenever the servo is activated, the LCD screen no longer works, and vice versa.    

Thursday 08/12/2022

Since the servo library is clashing with the library we used for the LCD, we tried using a motor instead of the servo to make the arm move, but quickly realised that this wasn’t a viable solution. Therefore, we went back to the servo and opted instead to find a different library for the speaker that wouldn’t crash. After a long time searching, we managed to find something, but it still didn’t work perfectly so we ended up going into the library and changing some code in there to try and fix the problem. Luckily, doing this solved the problem and we were able to continue finalising parts of the bear.

We then stitched all the components we could into place like the LCD in the stomach and the RFID scanner into the leg.

Friday 09/12/2022

As the teddy monkey is nearing completion, all we had to do today was solder all the wires in place and then apply heat shrink tubing into the areas that needed it. We spent a lot of time working on cable management and organising all our wiring as we knew that once everything was in the bear, it would be difficult to take it apart to get to the wires if there were any issues. We made all the wiring as flat as well as we could to make everything fit as flush to the Arduino and breadboard to minimise the chance of anything being knocked out of place as the bear moves.

Saturday 10/12/2022

Today we tried to add a second sound file into the code that would be played through the speaker when the correct card was scanned. We began by creating a voice recording that brought that into Audacity to edit the sound quality to make it 8-bit which would allow us to play it on the speaker. After that we took that sound file and encoded it so it gave us a series of numbers that could be interpreted it as sound by the speaker. However when we tested it, the bear no longer worked as the code file became too big for the arduino to read. We tried shortening parts to fix this but when we finally managed to play the sound it was too deep and distorted so we decided to remove it.

After deciding not to put in the speaker sound in the bear, we moved on to finally attaching the last section which was the servo arm. We then edited the code to make the arm movement smoother and began bug testing.

We trialled the bear many times to make sure the movements were all smooth and that each component worked as they should. When the bear starts up, the eyes should glow a yellowish colour and the LCD screen should show the message “SCAN YOUR KEYCARD”. When the correct card is scanned, the bear’s eyes turn green, the LCD displays the message “WELCOME BACK ZAYNA”, and the servo arm will wave at the user. If the incorrect card is scanned, the eyes turn red, the LCD shows “GO AWAY SOLE”, and the speaker in the foot begins to bark aggressively at the user. The barking was supposed to be a fun, jokey take on the idea of a “guard dog” since the barking would be coming from a monkey.

We decided to put the speaker and the RFID scanner in the feet as these are the elements of the teddy that are the most interactive so we decided to place them closest to the user. As for the scanner, the user should be able to see the red LED in the foot and intuitively scan their card there.

PROJECT TASK

LIST

GANT CHART

MAKER MANUAL

OVERVIEW

The Guard Monkey starts with a message, “Scan your keycard”, on the LCD screen, where the user will be prompted to scan the RFID tag with the module. The module will be looking out for a valid new card available for scanning. If the serial read by the module is the same as the string recorded as your card UID, it would print out the welcome back message on the LCD screen with green eyes and a servo-controlled wave movement with the arm which is achieved through limiting the change in position of the actuator between 110 and 180. If any other keycard has been scanned, the monkey goes into guard mode, printing out go away to the intruder with hostile red eyes and dog barking speaker sound playing through the speaker using the preset array of 16-bit 8000hz WAV file data.

TOOLS AND SUPPLIES

Electrical Components:

  • Arduino Uno
  • Breadboard
  • Speaker
  • Servo
  • RFID Scanner
  • RFID readable cards
  • LCD screem
  • PN2222A Transistor
  • 2x RGD LED
  • Wire

Non Electrical Components:

  • Cardboard
  • Electrical Tape
  • Recycled 15mm wood
  • 4mm Acrylic
  • 5mm Screws and nuts
  • Old teddy bear
  • Zipper
  • Heatshrink tubing
  • Solder

Tools:

  • Scissors
  • Unpicker
  • Needle and thread
  • Pillar Drill
  • Band Saw
  • Heat Gun
  • Soldering Iron
  • Wire Cutter

LAYOUT AND CIRCUIT DIAGRAM

BUILD SECTION

Building our robot bear monkey begins with carefully unpicking the seems of our teddy and removing both the limbs and stuffing from the innocent toy. Then using the stomach section of the bear as a reference, cut down a relatively thick piece of wood to a roundish shape that will sit inside the bear for structure and to house the Arduino uno and breadboard.

Once the wood is the right shape, measure out a rectangle using the Arduino and breadboard as a guide and, using a forstner bit on a pillar drill, carve out a section that will hold the Arduino flush in the wooden board. Then cut out a notch in the top tight corner where the servo will be affixed.

Then, using a thin strip of acrylic plastic, cut it down to roughly 1.5cm by 10cm or any size that fits within the bear’s arm. We then use a pillar drill with a 3mm bit to add holes to this piece which will match up with existing holes on a plastic servo arm. Then screw these pieces together with a small screw and nut. These must be small enough to not interfere with the movement of the servo.

Once all the wiring of the components is done, begin lining up the parts with the affiliated limbs of the bear to begin stitching them in place. This includes the RFID scanner in the left leg, the speaker in the right leg, the LCD screen in the torso, two RGB LEDs for the eyes and the acrylic servo attachment into the right arm.

Once everything is in place and power is attached to the bear, it will begin to interact with the user.

COMMENTED CODE

//Libraries for LCD screen
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
//Library for Servo
#include <Servo.h>
//Libraries for RFID tag
#include <SPI.h>
#include <MFRC522.h>
//Library for speaker
#include <FlagPCM.h>

//Definition of pins to their sensor/actuators
#define RST_PIN 9
#define SS_PIN 10
#define LED_G 7
#define LED_R 8
#define LED_G2 2
#define LED_R2 4

MFRC522 mfrc522(SS_PIN, RST_PIN);

LiquidCrystal_I2C lcd(0x27, 16, 2);

//Unsigned 8-bit characters for the barking sound delivered through the speaker
const unsigned char barking[] PROGMEM = {
126, 126, 127, 128, 128, 127, 129, 129, 129, 129, 128, 127, 127, 127, 127, 127, 127, 127, 128, 129, 127, 125, 125, 128, 129, 129, 128, 125, 125, 125, 127, 130, 130, 128, 127, 127, 128, 129, 127, 126, 126, 127, 129, 131, 130, 129, 127, 126, 126, 126, 127, 127, 125, 126, 127, 127, 127, 125, 125, 129, 130, 128, 128, 129, 130, 130, 129, 129, 129, 129, 126, 125, 127, 127, 124, 124, 126, 126, 126, 127, 128, 130, 129, 127, 129, 132, 131, 129, 127, 127, 127, 126, 126, 127, 129, 128, 127, 126, 126, 125, 127, 130, 129, 129, 127, 125, 126, 129, 129, 127, 126, 126, 128, 132, 133, 129, 126, 124, 122, 124, 128, 130, 131, 127, 123, 125, 130, 131, 130, 129, 128, 127, 127, 125, 125, 124, 123, 126, 132, 132, 128, 128, 131, 132, 132, 130, 127, 128, 128, 125, 123, 121, 117, 120, 129, 132, 129, 127, 126, 128, 133, 132, 131, 138, 139, 129, 123, 123, 119, 120, 124, 127, 129, 126, 119, 124, 132, 129, 128, 133, 133, 131, 131, 127, 124, 126, 125, 120, 124, 131, 132, 136, 137, 127, 122, 126, 122, 121, 130, 126, 118, 127, 134, 132, 138, 135, 120, 121, 129, 125, 123, 126, 125, 121, 121, 125, 141, 157, 149, 125, 119, 124, 115, 112, 122, 122, 116, 119, 127, 144, 152, 135, 124, 129, 130, 131, 129, 114, 111, 116, 110, 115, 143, 164, 159, 141, 127, 121, 117, 121, 121, 104, 99, 113, 122, 137, 149, 137, 129, 133, 130, 140, 162, 153, 121, 108, 107, 103, 111, 126, 126, 125, 126, 124, 142, 166, 145, 107, 104, 115, 127, 136, 121, 113, 132, 139, 147, 162, 151, 131, 115, 96, 105, 124, 106, 97, 119, 128, 131, 144, 147, 145, 143, 145, 156, 152, 130, 111, 94, 85, 96, 111, 129, 150, 155, 145, 131, 116, 111, 118, 127, 133, 133, 129, 128, 131, 152, 166, 139, 112, 113, 109, 106, 117, 114, 112, 124, 128, 137, 156, 155, 134, 109, 101, 126, 153, 153, 140, 120, 108, 117, 123, 137, 154, 127, 84, 89, 114, 120, 122, 134, 147, 159, 164, 167, 175, 158, 113, 83, 80, 79, 94, 120, 124, 140, 158, 136, 132, 155, 137, 112, 116, 109, 120, 147, 140, 147, 167, 134, 109, 132, 134, 122, 119, 88, 65, 89, 115, 132, 150, 151, 165, 204, 192, 155, 143, 105, 64, 64, 71, 90, 131, 137, 128, 155, 140, 107, 127, 139, 148, 165, 157, 154, 154, 107, 75, 115, 126, 106, 119, 117, 116, 137, 139, 124, 124, 114, 90, 117, 167, 195, 195, 144, 91, 82, 91, 95, 124, 141, 107, 95, 108, 117, 130, 168, 219, 197, 139, 127, 124, 98, 89, 84, 72, 110, 138, 135, 165, 166, 131, 108, 104, 122, 144, 141, 142, 173, 168, 121, 89, 95, 124, 125, 128, 122, 88, 84, 108, 122, 110, 108, 162, 230, 221, 157, 133, 106, 77, 81, 72, 102, 138, 115, 120, 136, 97, 90, 134, 149, 213, 255, 147, 49, 99, 90, 51, 96, 131, 129, 129, 107, 123, 165, 104, 49, 119, 173, 174, 203, 190, 127, 89, 64, 70, 125, 140, 101, 93, 112, 104, 94, 107, 159, 237, 236, 158, 107, 105, 108, 71, 57, 110, 141, 119, 111, 145, 141, 85, 77, 136, 216, 232, 195, 148, 86, 66, 73, 93, 124, 120, 115, 99, 77, 85, 122, 201, 255, 234, 121, 69, 84, 89, 110, 113, 106, 113, 101, 98, 112, 115, 107, 150, 241, 255, 168, 59, 31, 47, 80, 79, 87, 157, 149, 121, 158, 153, 102, 75, 99, 163, 213, 165, 125, 133, 92, 82, 93, 141, 193, 104, 48, 93, 99, 84, 110, 165, 230, 235, 133, 96, 113, 98, 109, 71, 62, 117, 120, 122, 127, 92, 85, 166, 240, 245, 175, 67, 41, 49, 81, 123, 128, 146, 107, 70, 100, 124, 183, 254, 229, 153, 120, 57, 45, 122, 110, 101, 124, 109, 113, 102, 71, 77, 157, 250, 255, 194, 93, 63, 53, 88, 110, 92, 105, 71, 32, 63, 165, 255, 255, 198, 147, 119, 64, 61, 118, 107, 104, 78, 50, 78, 61, 79, 200, 255, 255, 184, 106, 6, 34, 90, 71, 100, 132, 111, 111, 116, 71, 80, 171, 245, 255, 238, 124, 29, 50, 100, 94, 92, 111, 122, 99, 77, 71, 127, 243, 255, 216, 141, 64, 91, 115, 102, 78, 63, 68, 55, 89, 114, 113, 167, 238, 255, 210, 123, 55, 57, 107, 75, 77, 103, 58, 68, 87, 128, 249, 255, 207, 176, 102, 30, 69, 123, 103, 84, 84, 89, 115, 81, 60, 147, 246, 255, 225, 101, 44, 37, 88, 101, 90, 111, 73, 51, 69, 129, 239, 255, 211, 164, 98, 44, 52, 124, 143, 124, 86, 54, 76, 33, 56, 195, 248, 255, 202, 90, 24, 23, 100, 122, 98, 120, 114, 83, 49, 85, 190, 251, 253, 201, 130, 44, 24, 109, 139, 144, 127, 61, 73, 64, 64, 173, 235, 249, 225, 124, 34, 32, 118, 151, 113, 81, 73, 83, 44, 86, 219, 249, 227, 163, 92, 61, 53, 97, 110, 123, 111, 51, 61, 47, 96, 233, 254, 240, 204, 82, 0, 21, 88, 97, 141, 138, 84, 78, 33, 78, 226, 255, 255, 204, 87, 12, 18, 89, 131, 128, 89, 64, 87, 66, 123, 242, 249, 238, 164, 29, 4, 66, 120, 138, 145, 97, 68, 81, 21, 85, 236, 255, 250, 182, 42, 0, 49, 139, 155, 160, 120, 36, 29, 61, 146, 245, 255, 239, 144, 30, 0, 57, 147, 159, 151, 120, 79, 66, 20, 80, 226, 255, 242, 181, 73, 11, 50, 142, 163, 125, 61, 23, 59, 108, 190, 248, 242, 207, 120, 46, 29, 82, 170, 161, 102, 68, 46, 35, 49, 136, 242, 255, 234, 105, 0, 0, 37, 104, 161, 188, 161, 128, 92, 13, 71, 223, 251, 236, 184, 72, 13, 44, 105, 166, 200, 133, 79, 81, 30, 49, 148, 235, 255, 244, 115, 14, 14, 93, 158, 155, 129, 136, 106, 36, 13, 66, 189, 255, 255, 183, 100, 45, 55, 89, 114, 144, 146, 119, 80, 54, 87, 156, 222, 247, 223, 132, 26, 35, 105, 119, 92, 98, 122, 115, 126, 139, 134, 119, 123, 188, 218, 163, 110, 98, 96, 88, 77, 81, 150, 197, 158, 109, 55, 28, 101, 210, 252, 246, 203, 104, 38, 43, 81, 115, 111, 105, 113, 102, 66, 77, 165, 255, 255, 210, 102, 41, 55, 78, 68, 102, 165, 175, 138, 104, 79, 79, 134, 202, 255, 255, 156, 44, 2, 42, 99, 151, 188, 164, 130, 107, 77, 54, 92, 188, 250, 253, 190, 118, 84, 57, 66, 97, 121, 148, 156, 138, 101, 54, 44, 123, 227, 255, 239, 173, 85, 37, 58, 86, 114, 152, 138, 96, 80, 68, 71, 162, 255, 255, 233, 143, 35, 24, 59, 88, 130, 173, 164, 127, 105, 79, 104, 141, 143, 177, 226, 225, 163, 90, 47, 55, 106, 128, 133, 157, 164, 123, 71, 65, 92, 140, 209, 245, 222, 176, 99, 27, 49, 100, 117, 136, 154, 152, 117, 76, 69, 108, 159, 201, 228, 212, 174, 112, 41, 42, 83, 112, 137, 151, 159, 150, 114, 86, 98, 140, 170, 166, 152, 151, 146, 129, 120, 111, 97, 99, 114, 131, 139, 129, 137, 144, 131, 117, 93, 91, 138, 203, 222, 172, 115, 84, 77, 81, 97, 139, 182, 178, 118, 74, 79, 83, 107, 164, 185, 181, 196, 167, 100, 77, 83, 100, 129, 130, 100, 107, 131, 142, 170, 163, 120, 110, 112, 112, 111, 129, 166, 183, 159, 112, 88, 84, 101, 140, 158, 151, 130, 110, 110, 115, 126, 134, 139, 149, 142, 124, 116, 126, 143, 121, 75, 75, 115, 154, 176, 166, 136, 118, 113, 91, 90, 119, 134, 147, 144, 129, 138, 163, 164, 124, 112, 126, 108, 92, 93, 98, 98, 108, 135, 156, 169, 158, 138, 155, 175, 163, 129, 98, 66, 47, 62, 85, 112, 173, 219, 206, 154, 99, 91, 111, 121, 130, 139, 138, 114, 95, 96, 113, 137, 132, 128, 128, 122, 144, 158, 151, 130, 108, 103, 102, 110, 125, 137, 128, 110, 117, 127, 140, 146, 130, 126, 126, 116, 107, 106, 114, 122, 121, 132, 156, 162, 146, 123, 107, 108, 117, 117, 111, 117, 129, 146, 146, 123, 121, 129, 132, 119, 99, 116, 138, 137, 135, 141, 145, 134, 127, 119, 119, 118, 106, 107, 101, 110, 145, 150, 141, 135, 119, 117, 129, 130, 127, 134, 119, 102, 115, 126, 129, 128, 119, 126, 145, 158, 157, 138, 123, 106, 85, 91, 124, 147, 152, 144, 125, 110, 115, 125, 123, 122, 130, 134, 123, 110, 110, 121, 140, 137, 126, 140, 140, 123, 128, 134, 128, 123, 115, 106, 120, 134, 126, 124, 120, 122, 141, 141, 132, 133, 134, 128, 119, 118, 119, 124, 123, 116, 118, 122, 136, 148, 143, 136, 133, 130, 121, 118, 111, 103, 122, 140, 139, 130, 116, 108, 127, 149, 147, 143, 131, 112, 111, 123, 130, 130, 136, 135, 127, 121, 113, 113, 123, 136, 134, 125, 131, 135, 136, 132, 133, 138, 130, 120, 108, 100, 106, 116, 129, 142, 155, 154, 145, 130, 112, 117, 124, 116, 117, 129, 137, 129, 118, 118, 131, 137, 132, 131, 121, 114, 126, 138, 146, 151, 138, 123, 121, 121, 127, 128, 113, 108, 117, 119, 120, 132, 138, 135, 140, 149, 145, 131, 116, 108, 110, 122, 129, 129, 129, 124, 127, 134, 123, 121, 139, 142, 131, 127, 126, 129, 133, 134, 139, 132, 110, 112, 124, 116, 114, 126, 132, 137, 135, 124, 125, 134, 138, 139, 129, 116, 118, 127, 126, 120, 123, 129, 124, 124, 135, 135, 128, 127, 127, 134, 141, 132, 122, 119, 117, 127, 137, 132, 125, 121, 113, 119, 131, 134, 131, 126, 126, 136, 132, 123, 126, 127, 126, 129, 127, 125, 125, 122, 120, 122, 127, 130, 132, 133, 132, 130, 125, 121, 119, 124, 127, 125, 127, 132, 136, 134, 130, 128, 125, 126, 127, 122, 120, 126, 127, 129, 135, 127, 118, 123, 132, 134, 131, 127, 125, 132, 134, 122, 115, 114, 117, 128, 140, 138, 129, 125, 121, 124, 129, 126, 125, 126, 128, 134, 133, 129, 129, 127, 119, 118, 125, 126, 132, 131, 122, 122, 125, 127, 128, 127, 125, 132, 138, 130, 128, 129, 119, 116, 122, 126, 127, 126, 126, 128, 133, 130, 124, 128, 130, 128, 129, 126, 121, 126, 132, 133, 129, 126, 127, 125, 123, 128, 129, 129, 129, 123, 118, 125, 132, 130, 130, 128, 124, 123, 123, 127, 131, 131, 127, 126, 130, 129, 127, 124, 123, 125, 128, 134, 135, 131, 126, 124, 126, 123, 126, 125, 118, 123, 131, 138, 139, 132, 126, 127, 128, 127, 126, 123, 121, 123, 121, 122, 129, 134, 134, 133, 127, 124, 128, 127, 129, 133, 130, 126, 122, 120, 123, 129, 133, 133, 132, 128, 128, 125, 121, 124, 126, 127, 128, 127, 126, 128, 130, 128, 129, 129, 128, 132, 132, 129, 128, 126, 123, 124, 125, 123, 125, 128, 131, 133, 130, 127, 127, 126, 125, 129, 132, 130, 128, 126, 123, 122, 125, 128, 130, 130, 130, 129, 130, 130, 129, 128, 127, 125, 123, 124, 124, 128, 133, 133, 130, 127, 127, 126, 128, 130, 131, 129, 125, 122, 121, 122, 126, 130, 132, 131, 131, 131, 127, 124, 125, 126, 130, 131, 128, 126, 124, 123, 127, 130, 130, 129, 127, 126, 126, 127, 130, 131, 131, 127, 123, 122, 124, 128, 133, 133, 129, 126, 125, 126, 129, 127, 126, 127, 128, 127, 125, 125, 127, 129, 131, 130, 129, 129, 129, 128, 127, 126, 126, 127, 126, 127, 126, 126, 128, 130, 130, 126, 124, 127, 129, 130, 129, 127, 128, 129, 129, 128, 128, 126, 125, 125, 123, 125, 128, 130, 129, 128, 128, 130, 131, 129, 127, 126, 125, 124, 124, 126, 127, 128, 129, 129, 132, 133, 132, 129, 123, 123, 126, 128, 128, 125, 123, 128, 131, 131, 130, 128, 127, 125, 124, 126, 127, 128, 128, 128, 129, 129, 130, 130, 130, 130, 126, 125, 128, 127, 128, 128, 127, 126, 127, 127, 126, 125, 125, 126, 128, 132, 132, 131, 128, 126, 126, 125, 126, 127, 126, 125, 123, 126, 128, 131, 133, 132, 131, 128, 124, 125, 129, 130, 129, 128, 126, 124, 126, 128, 130, 130, 131, 129, 127, 125, 125, 127, 126, 124, 124, 126, 127, 128, 130, 131, 132, 132, 130, 128, 125, 124, 126, 129, 128, 125, 126, 127, 128, 129, 129, 129, 129, 126, 124, 125, 126, 128, 129, 128, 127, 127, 128, 128, 128, 128, 127, 128, 128, 128, 126, 124, 126, 128, 130, 130, 128, 126, 127, 129, 131, 132, 128, 126, 126, 126, 128, 128, 127, 127, 125, 125, 126, 127, 127, 129, 130, 128, 129, 128, 126, 126, 127, 127, 128, 128, 128, 130, 128, 125, 125, 125, 129, 130, 129, 127, 126, 127, 128, 128, 127, 125, 127, 129, 131, 131, 128, 127, 126, 125, 126, 126, 127, 129, 128, 126, 126, 127, 128, 129, 131, 131, 129, 127, 124, 124, 126, 127, 129, 129, 129, 130, 130, 128, 126, 125, 126, 126, 124, 123, 124, 128, 131, 132, 130, 129, 129, 131, 131, 129, 127, 126, 125, 125, 125, 125, 125, 125, 126, 128, 130, 130, 128, 125, 124, 127, 131, 132, 131, 130, 128, 127, 126, 125, 126, 129, 130, 128, 124, 123, 125, 129, 131, 131, 129, 128, 126, 125, 125, 126, 127, 127, 126, 125, 128, 132, 132, 129, 124, 124, 128, 132, 133, 130, 127, 127, 127, 126, 124, 124, 125, 127, 126, 125, 125, 127, 129, 132, 133, 133, 131, 127, 124, 123, 126, 129, 130, 126, 122, 122, 127, 132, 134, 133, 131, 130, 129, 126, 125, 126, 125, 124, 122, 120, 122, 126, 130, 134, 134, 133, 133, 132, 131, 129, 128, 127, 123, 120, 118, 121, 125, 128, 131, 132, 133, 133, 135, 135, 133, 128, 121, 118, 116, 116, 120, 122, 128, 133, 134, 135, 134, 134, 135, 137, 133, 127, 123, 118, 120, 122, 121, 122, 122, 125, 129, 132, 132, 130, 133, 132, 132, 129, 121, 118, 115, 117, 122, 127, 137, 147, 153, 151, 138, 124, 115, 113, 113, 113, 113, 114, 115, 120, 129, 138, 144, 143, 138, 137, 135, 137, 141, 138, 127, 112, 100, 100, 107, 118, 132, 145, 146, 137, 125, 116, 121, 132, 134, 128, 118, 118, 130, 146, 156, 151, 140, 129, 118, 110, 100, 100, 111, 122, 124, 121, 124, 136, 150, 149, 138, 131, 132, 145, 152, 139, 117, 105, 105, 111, 116, 113, 120, 130, 131, 126, 119, 126, 139, 144, 140, 134, 140, 153, 159, 143, 117, 103, 101, 109, 108, 105, 114, 126, 132, 126, 126, 132, 142, 147, 145, 145, 148, 152, 143, 119, 98, 94, 109, 127, 131, 120, 106, 101, 105, 118, 132, 143, 152, 167, 180, 177, 156, 122, 100, 94, 97, 101, 103, 108, 110, 115, 125, 138, 151, 148, 139, 126, 130, 150, 163, 159, 137, 114, 100, 98, 100, 105, 124, 139, 136, 115, 96, 91, 105, 139, 179, 209, 205, 170, 126, 94, 86, 91, 99, 105, 107, 105, 104, 113, 125, 132, 133, 144, 177, 208, 205, 164, 115, 77, 69, 73, 86, 108, 120, 131, 132, 125, 118, 105, 111, 148, 210, 238, 199, 133, 69, 50, 71, 99, 127, 135, 121, 108, 99, 95, 98, 116, 178, 242, 250, 200, 104, 36, 41, 77, 104, 116, 125, 124, 122, 111, 97, 92, 103, 174, 250, 255, 204, 108, 31, 31, 72, 102, 138, 153, 139, 115, 79, 66, 65, 130, 231, 255, 255, 173, 43, 0, 22, 75, 115, 144, 156, 153, 127, 84, 60, 54, 130, 236, 255, 255, 145, 24, 0, 39, 93, 143, 167, 146, 115, 74, 57, 50, 108, 231, 255, 255, 190, 42, 0, 9, 64, 120, 138, 152, 148, 129, 106, 87, 74, 134, 222, 249, 235, 142, 42, 12, 36, 86, 121, 146, 137, 114, 99, 90, 93, 139, 219, 232, 226, 169, 58, 29, 27, 61, 113, 122, 138, 145, 132, 125, 106, 78, 137, 219, 228, 223, 144, 52, 38, 56, 78, 86, 124, 150, 156, 169, 126, 86, 79, 119, 202, 242, 212, 141, 75, 42, 51, 79, 112, 143, 138, 130, 122, 95, 65, 91, 181, 247, 255, 219, 87, 1, 8, 65, 118, 140, 130, 126, 127, 120, 112, 100, 148, 224, 253, 219, 113, 18, 24, 89, 127, 152, 156, 110, 79, 61, 42, 80, 188, 255, 255, 225, 90, 0, 0, 50, 139, 168, 156, 140, 104, 71, 57, 88, 145, 231, 255, 234, 155, 48, 0, 30, 125, 180, 177, 127, 44, 21, 71, 125, 218, 255, 255, 227, 132, 10, 0, 19, 111, 196, 201, 111, 52, 37, 63, 146, 220, 255, 255, 228, 113, 0, 0, 30, 130, 207, 198, 144, 80, 39, 65, 109, 143, 223, 255, 244, 158, 43, 0, 39, 124, 194, 195, 132, 53, 13, 46, 90, 164, 255, 255, 217, 144, 44, 0, 44, 113, 148, 146, 114, 84, 75, 92, 113, 167, 232, 225, 207, 163, 57, 18, 54, 96, 135, 143, 104, 58, 68, 117, 167, 239, 255, 236, 184, 108, 23, 22, 56, 83, 135, 144, 100, 72, 84, 129, 188, 255, 255, 230, 168, 67, 0, 19, 61, 112, 162, 156, 137, 118, 95, 104, 134, 170, 213, 230, 195, 117, 50, 39, 71, 132, 160, 136, 108, 57, 46, 90, 120, 194, 255, 222, 179, 131, 63, 38, 54, 72, 94, 113, 105, 98, 107, 103, 131, 220, 245, 210, 184, 92, 22, 39, 46, 72, 108, 106, 113, 131, 148, 180, 216, 224, 205, 188, 134, 45, 12, 20, 34, 88, 130, 143, 158, 159, 184, 221, 219, 201, 163, 117, 77, 31, 24, 40, 67, 139, 180, 177, 172, 140, 113, 125, 166, 196, 202, 186, 129, 80, 61, 28, 38, 93, 107, 128, 166, 140, 144, 185, 183, 199, 191, 123, 70, 61, 55, 42, 75, 97, 107, 142, 128, 117, 158, 188, 205, 211, 149, 76, 62, 46, 47, 57, 52, 86, 132, 185, 213, 203, 200, 197, 186, 120, 55, 41, 36, 63, 89, 87, 95, 130, 177, 229, 247, 195, 169, 150, 106, 87, 61, 42, 45, 84, 127, 139, 172, 178, 153, 130, 115, 141, 175, 189, 166, 126, 83, 50, 66, 95, 111, 107, 127, 141, 124, 151, 178, 196, 214, 175, 104, 47, 38, 52, 83, 114, 114, 128, 134, 119, 122, 160, 194, 216, 218, 141, 54, 8, 0, 25, 63, 103, 150, 196, 209, 176, 155, 164, 191, 189, 133, 60, 12, 9, 34, 75, 109, 146, 195, 217, 206, 171, 156, 165, 166, 135, 84, 55, 38, 38, 44, 55, 114, 213, 255, 251, 177, 119, 83, 93, 113, 125, 126, 105, 60, 22, 29, 78, 195, 255, 255, 196, 106, 55, 47, 84, 117, 117, 135, 135, 117, 95, 85, 108, 144, 185, 204, 199, 155, 85, 50, 61, 103, 131, 155, 145, 86, 61, 59, 85, 139, 202, 241, 213, 161, 79, 34, 68, 104, 127, 114, 71, 48, 79, 115, 153, 232, 255, 255, 187, 74, 19, 29, 93, 137, 127, 103, 79, 92, 105, 103, 127, 188, 255, 255, 202, 81, 15, 11, 55, 116, 139, 146, 114, 67, 58, 83, 168, 255, 255, 233, 140, 60, 9, 5, 50, 118, 175, 190, 156, 95, 47, 53, 150, 241, 255, 253, 156, 42, 0, 0, 65, 132, 153, 159, 138, 109, 91, 116, 186, 231, 240, 192, 83, 19, 17, 31, 70, 116, 167, 184, 151, 116, 92, 120, 192, 221, 209, 162, 84, 43, 31, 24, 66, 146, 208, 203, 146, 84, 34, 84, 187, 227, 251, 206, 86, 20, 0, 39, 141, 201, 192, 133, 56, 20, 51, 155, 255, 255, 242, 159, 62, 26, 21, 57, 123, 164, 153, 105, 82, 85, 121, 182, 201, 199, 191, 155, 109, 72, 62, 96, 150, 162, 131, 100, 83, 79, 82, 97, 119, 178, 243, 230, 181, 125, 84, 91, 89, 92, 112, 94, 53, 38, 63, 136, 224, 255, 240, 172, 106, 76, 77, 98, 129, 145, 121, 73, 51, 82, 147, 202, 211, 173, 119, 84, 74, 93, 134, 184, 207, 162, 99, 65, 73, 111, 124, 118, 114, 117, 138, 152, 162, 168, 153, 136, 115, 112, 126, 118, 103, 76, 65, 99, 144, 183, 196, 162, 122, 104, 96, 115, 154, 159, 152, 137, 105, 88, 86, 96, 122, 159, 175, 144, 111, 93, 105, 142, 148, 136, 133, 138, 145, 138, 125, 118, 119, 132, 130, 121, 134, 133, 118, 101, 77, 88, 122, 164, 200, 183, 146, 111, 92, 109, 124, 134, 133, 105, 78, 75, 89, 127, 185, 224, 218, 158, 78, 48, 74, 127, 167, 164, 139, 116, 113, 121, 134, 166, 180, 155, 103, 49, 41, 82, 127, 158, 175, 176, 158, 134, 117, 109, 126, 148, 139, 118, 100, 95, 110, 128, 133, 140, 151, 140, 110, 94, 101, 124, 150, 156, 143, 131, 130, 128, 131, 140, 141, 135, 110, 79, 73, 94, 126, 145, 148, 147, 136, 139, 152, 161, 174, 165, 140, 107, 73, 73, 90, 113, 140, 141, 131, 126, 123, 134, 159, 172, 168, 146, 113, 89, 80, 88, 109, 133, 154, 152, 133, 122, 116, 121, 143, 157, 152, 140, 118, 93, 79, 88, 113, 142, 165, 162, 147, 135, 127, 131, 140, 144, 134, 120, 105, 82, 80, 98, 123, 151, 159, 148, 137, 135, 141, 145, 145, 139, 123, 104, 90, 82, 94, 122, 143, 146, 136, 132, 139, 146, 143, 132, 124, 115, 110, 108, 111, 125, 142, 156, 148, 131, 128, 136, 138, 123, 110, 106, 107, 119, 127, 127, 131, 140, 141, 138, 140, 146, 158, 159, 138, 111, 97, 97, 102, 108, 108, 105, 115, 126, 129, 138, 154, 162, 163, 152, 124, 107, 111, 117, 115, 112, 114, 120, 130, 131, 127, 130, 137, 140, 135, 126, 118, 124, 134, 122, 113, 119, 129, 136, 134, 128, 127, 131, 132, 124, 113, 110, 115, 118, 118, 119, 134, 151, 153, 148, 137, 133, 137, 132, 123, 117, 113, 111, 109, 107, 111, 121, 128, 128, 127, 131, 135, 143, 151, 149, 149, 151, 137, 120, 114, 107, 99, 98, 100, 109, 123, 131, 138, 144, 146, 145, 142, 140, 133, 134, 137, 124, 113, 116, 116, 114, 115, 115, 121, 134, 139, 137, 137, 136, 136, 137, 136, 132, 131, 127, 114, 105, 106, 116, 129, 139, 137, 128, 122, 116, 112, 123, 136, 143, 144, 134, 123, 120, 119, 128, 136, 130, 124, 117, 113, 116, 122, 133, 137, 137, 142, 139, 134, 134, 131, 129, 123, 111, 109, 115, 118, 122, 126, 125, 131, 139, 142, 141, 139, 137, 128, 116, 109, 106, 116, 129, 130, 130, 133, 133, 135, 134, 131, 133, 137, 134, 128, 125, 121, 119, 120, 115, 111, 117, 125, 128, 128, 130, 135, 141, 144, 144, 140, 134, 126, 119, 119, 119, 122, 131, 128, 122, 123, 125, 132, 137, 137, 136, 130, 125, 124, 123, 127, 127, 124, 121, 115, 115, 122, 129, 137, 140, 137, 131, 127, 123, 122, 126, 128, 126, 125, 125, 124, 125, 125, 125, 123, 124, 128, 134, 137, 138, 140, 140, 133, 127, 124, 120, 114, 113, 112, 112, 121, 130, 137, 139, 137, 137, 135, 130, 126, 125, 127, 123, 122, 122, 121, 123, 125, 124, 123, 124, 127, 129, 135, 138, 137, 136, 133, 131, 131, 130, 129, 124, 120, 120, 120, 123, 124, 129, 134, 128, 125, 128, 130, 133, 134, 134, 134, 133, 131, 127, 123, 121, 123, 123, 120, 119, 124, 131, 126, 123, 127, 129, 134, 136, 133, 133, 133, 130, 124, 120, 122, 126, 125, 119, 113, 116, 125, 130, 133, 133, 134, 136, 132, 128, 129, 132, 132, 124, 120, 119, 119, 126, 129, 127, 126, 128, 130, 130, 127, 127, 128, 123, 121, 124, 127, 130, 131, 133, 133, 130, 130, 131, 130, 129, 125, 122, 120, 120, 124, 131, 133, 136, 137, 133, 125, 121, 122, 125, 128, 125, 121, 123, 126, 130, 128, 127, 129, 129, 132, 129, 124, 125, 126, 127, 127, 123, 124, 129, 128, 130, 136, 136, 135, 133, 128, 124, 124, 124, 121, 121, 122, 125, 127, 125, 123, 125, 132, 133, 132, 130, 125, 124, 125, 130, 134, 133, 130, 124, 118, 117, 118, 122, 125, 128, 130, 133, 134, 135, 138, 139, 137, 133, 127, 122, 118, 115, 117, 124, 129, 129, 129, 127, 127, 130, 131, 129, 129, 129, 128, 127, 122, 121, 127, 130, 130, 128, 126, 124, 126, 127, 126, 129, 130, 128, 125, 124, 124, 126, 133, 134, 131, 129, 128, 127, 126, 129, 129, 129, 128, 125, 125, 125, 125, 128, 129, 127, 126, 127, 129, 130, 131, 130, 129, 128, 125, 125, 126, 126, 128, 129, 127, 127, 128, 129, 131, 130, 129, 129, 127, 125, 125, 126, 127, 128, 126, 124, 125, 125, 128, 131, 132, 131, 129, 129, 126, 125, 128, 127, 126, 127, 126, 126, 128, 127, 129, 129, 128, 128, 127, 126, 127, 127, 128, 126, 125, 125, 125, 127, 129, 127, 126, 127, 128, 130, 131, 129, 129, 129, 128, 127, 124, 125, 127, 129, 130, 130, 128, 125, 126, 127, 129, 130, 130, 129, 126, 124, 125, 126, 127, 130, 130, 128, 126, 126, 127, 127, 127, 128, 129, 129, 126, 125, 125, 124, 127, 131, 131, 131, 130, 127, 124, 125, 127, 130, 131, 129, 128, 127, 126, 126, 126, 127, 128, 128, 127, 128, 128, 127, 128, 127, 127, 128, 127, 127, 126, 124, 125, 126, 127, 128, 129, 131, 130, 130, 129, 127, 125, 126, 127, 128, 129, 129, 130, 131, 132, 130, 128, 127, 125, 125, 125, 124, 126, 127, 127, 129, 128, 127, 130, 130, 129, 130, 128, 127, 125, 125, 126, 126, 128, 127, 126, 128, 128, 129, 130, 129, 128, 128, 128, 128, 129, 128, 128, 128, 125, 126, 126, 125, 127, 127, 128, 130, 129, 127, 128, 127, 127, 127, 127, 127, 125, 126, 128, 129, 131, 131, 130, 128, 125, 125, 125, 125, 128, 130, 130, 129, 128, 126, 126, 128, 131, 132, 131, 128, 125, 124, 125, 126, 126, 127, 126, 126, 125, 125, 127, 128, 129, 129, 128, 129, 128, 128, 129, 128, 128, 126, 126, 127, 128, 130, 130, 130, 128, 127, 127, 125, 125, 125, 126, 128, 128, 127, 126, 127, 129, 130, 130, 129, 127, 126, 126, 127, 126, 126, 126, 127, 127, 129, 130, 129, 130, 130, 128, 126, 125, 125, 124, 126, 128, 129, 129, 129, 129, 129, 129, 129, 129, 130, 130, 128, 124, 123, 123, 124, 128, 129, 129, 129, 128, 126, 127, 129, 130, 130, 128, 127, 126, 125, 125, 125, 125, 129, 131, 131, 129, 127, 127, 128, 128, 128, 128, 128, 127, 126, 126, 126, 128, 129, 130, 129, 127, 128, 128, 127, 126, 127, 127, 126, 126, 126, 127, 128, 127, 127, 128, 128, 129, 129, 130, 128, 126, 126, 127, 127, 127, 127, 129, 128, 128, 128, 126, 127, 129, 130, 130, 129, 128, 125, 125, 126, 126, 127, 128, 128, 127, 127, 128, 127, 128, 128, 128, 128, 126, 125, 126, 126, 127, 128, 129, 128, 129, 129, 128, 129, 130, 129, 128, 127, 124, 125, 126, 126, 128, 129, 128, 128, 127, 128, 129, 129, 129, 128, 127, 125, 124, 126, 127, 128, 128, 128, 128, 127, 127, 128, 128, 129, 128, 126, 125, 125, 126, 127, 129, 129, 130, 129, 128, 128, 128, 128, 128, 127, 127, 126, 125, 127, 127, 128, 128, 128, 129, 129, 128, 128, 127, 126, 125, 125, 126, 126, 128, 129, 129, 130, 129, 128, 129, 129, 128, 127, 126, 125, 124, 124, 125, 128, 128, 129, 131, 131, 130, 129, 129, 129, 127, 127, 127, 125, 125, 124, 125, 127, 128, 130, 131, 129, 128, 127, 126, 127, 128, 127, 128, 128, 127, 126, 128, 128, 128, 131, 130, 128, 127, 125, 124, 125, 126, 126, 126, 128, 128, 128, 129, 129, 130, 129, 128, 128, 127, 127, 125, 125, 125, 125, 127, 128, 129, 129, 128, 128, 128, 126, 126, 128, 128, 128, 128, 128, 128, 129, 130, 130, 131, 130, 128, 128, 125, 124, 125, 124, 126, 127, 125, 127, 129, 128, 128, 129, 130, 129, 129, 128, 127, 125, 125, 126, 127, 129, 129, 129, 128, 128, 127, 128, 129, 127, 126, 126, 125, 126, 126, 128, 129, 128, 129, 129, 129, 129, 129, 128, 127, 127, 126, 125, 127, 127, 128, 130, 130, 129, 128, 127, 128, 129, 127, 127, 126, 125, 125, 125, 124, 128, 130, 131, 131, 129, 127, 126, 127, 128, 128, 128, 126, 124, 123, 125, 128, 128, 129, 131, 132, 132, 130, 126, 125, 126, 128, 128, 126, 124, 123, 124, 128, 128, 129, 131, 132, 132, 129, 124, 125, 128, 128, 127, 125, 124, 125, 125, 128, 130, 131, 133, 130, 127, 127, 126, 127, 127, 127, 127, 126, 126, 124, 126, 128, 128, 129, 128, 128, 128, 127, 127, 128, 126, 124, 127, 128, 129, 129, 129, 132, 133, 131, 129, 128, 128, 126, 124, 122, 125, 127, 128, 127, 125, 124, 128, 129, 130, 130, 127, 125, 126, 125, 127, 129, 130, 133, 133, 132, 129, 128, 127, 125, 125, 125, 126, 127, 125, 121, 119, 123, 126, 129, 132, 130, 128, 126, 128, 133, 135, 134, 133, 134, 133, 129, 122, 119, 121, 124, 124, 118, 114, 119, 126, 133, 139, 140, 142, 139, 131, 127, 125, 119, 114, 111, 116, 127, 137, 142, 138, 134, 131, 128, 128, 125, 123, 120, 116, 115, 117, 126, 134, 139, 139, 133, 126, 123, 125, 126, 130, 137, 140, 139, 129, 118, 115, 119, 125, 126, 123, 119, 118, 121, 127, 138, 146, 143, 135, 125, 116, 117, 126, 141, 151, 143, 128, 111, 107, 114, 117, 120, 125, 125, 126, 130, 136, 142, 145, 140, 129, 117, 111, 111, 115, 125, 133, 140, 149, 146, 137, 130, 126, 127, 122, 108, 92, 90, 108, 130, 142, 147, 154, 158, 150, 137, 131, 136, 139, 128, 108, 98, 102, 109, 114, 118, 123, 130, 135, 136, 139, 148, 157, 155, 141, 122, 108, 107, 116, 121, 117, 117, 124, 130, 127, 118, 116, 129, 150, 154, 139, 122, 119, 127, 130, 124, 123, 135, 143, 134, 124, 122, 125, 123, 113, 105, 104, 113, 126, 136, 145, 149, 154, 160, 151, 140, 135, 125, 109, 89, 74, 83, 114, 149, 162, 148, 132, 127, 129, 129, 116, 110, 127, 148, 162, 155, 134, 125, 122, 119, 115, 106, 105, 107, 101, 106, 120, 134, 148, 157, 163, 170, 171, 158, 125, 99, 89, 85, 92, 106, 118, 134, 139, 131, 129, 129, 124, 128, 148, 166, 166, 154, 132, 109, 102, 104, 107, 111, 104, 99, 111, 131, 144, 147, 150, 155, 150, 138, 121, 117, 139, 152, 137, 106, 81, 89, 116, 140, 149, 134, 115, 106, 100, 106, 122, 148, 194, 216, 191, 140, 90, 68, 74, 87, 103, 118, 129, 131, 124, 129, 141, 138, 132, 138, 161, 185, 178, 141, 99, 72, 76, 104, 125, 129, 123, 107, 98, 103, 108, 129, 179, 228, 238, 196, 122, 64, 48, 58, 75, 102, 136, 148, 138, 132, 128, 132, 137, 128, 134, 169, 184, 165, 130, 99, 89, 95, 108, 125, 137, 136, 120, 101, 91, 86, 106, 163, 219, 236, 203, 139, 85, 58, 55, 75, 111, 141, 147, 128, 102, 95, 108, 130, 166, 211, 232, 201, 126, 59, 38, 60, 100, 131, 148, 155, 139, 114, 95, 79, 87, 145, 216, 244, 208, 136, 77, 61, 83, 114, 133, 135, 116, 90, 80, 84, 109, 167, 229, 255, 248, 162, 54, 2, 20, 64, 102, 135, 163, 181, 177, 143, 101, 82, 90, 121, 164, 190, 183, 151, 112, 86, 89, 120, 147, 145, 113, 73, 52, 60, 102, 171, 237, 255, 222, 143, 66, 29, 47, 88, 117, 136, 155, 156, 131, 108, 106, 120, 131, 140, 153, 174, 188, 168, 123, 85, 79, 93, 104, 111, 118, 133, 148, 147, 130, 102, 93, 118, 164, 197, 194, 162, 118, 88, 76, 87, 124, 154, 145, 108, 76, 56, 63, 126, 206, 249, 249, 197, 88, 0, 0, 47, 111, 163, 184, 174, 149, 125, 110, 115, 120, 105, 100, 122, 155, 172, 173, 160, 146, 139, 111, 84, 88, 101, 109, 112, 102, 72, 81, 157, 236, 255, 230, 146, 49, 7, 28, 78, 141, 185, 186, 133, 61, 36, 83, 176, 246, 255, 204, 95, 17, 2, 37, 102, 174, 210, 188, 137, 90, 72, 79, 100, 139, 186, 213, 189, 137, 95, 86, 111, 139, 139, 105, 84, 87, 75, 53, 74, 163, 242, 255, 245, 166, 68, 11, 11, 39, 90, 145, 159, 144, 121, 112, 153, 213, 209, 132, 81, 77, 85, 104, 123, 143, 162, 159, 117, 83, 110, 153, 162, 129, 83, 69, 92, 136, 184, 235, 255, 217, 125, 24, 0, 39, 106, 139, 141, 133, 109, 92, 115, 183, 253, 255, 199, 85, 6, 0, 19, 100, 190, 235, 198, 121, 71, 63, 99, 170, 238, 246, 189, 106, 41, 28, 64, 128, 175, 180, 151, 116, 89, 54, 45, 109, 207, 255, 239, 170, 92, 52, 51, 66, 101, 141, 154, 124, 74, 45, 77, 171, 246, 253, 203, 115, 29, 0, 27, 77, 138, 179, 175, 147, 136, 154, 156, 123, 82, 70, 97, 137, 174, 194, 189, 170, 140, 99, 68, 70, 79, 68, 61, 76, 131, 201, 232, 215, 185, 157, 120, 68, 37, 53, 87, 115, 137, 148, 151, 133, 110, 119, 142, 173, 189, 162, 123, 96, 86, 98, 119, 130, 137, 136, 117, 99, 91, 97, 109, 135, 189, 218, 193, 155, 120, 90, 81, 93, 113, 121, 95, 71, 72, 97, 167, 233, 249, 219, 140, 71, 42, 36, 60, 105, 149, 161, 124, 86, 88, 114, 170, 236, 236, 168, 77, 17, 36, 99, 159, 195, 177, 108, 43, 26, 72, 151, 215, 254, 231, 135, 60, 45, 77, 127, 147, 150, 133, 86, 51, 47, 79, 158, 241, 255, 236, 130, 44, 41, 77, 116, 134, 122, 94, 66, 76, 128, 183, 218, 227, 195, 134, 86, 64, 79, 103, 109, 124, 137, 136, 131, 114, 102, 99, 118, 175, 219, 203, 150, 96, 63, 62, 84, 122, 155, 156, 133, 86, 41, 44, 111, 220, 255, 255, 187, 85, 13, 0, 49, 139, 200, 191, 116, 33, 0, 48, 181, 255, 255, 225, 89, 0, 0, 22, 135, 228, 238, 161, 57, 3, 22, 107, 223, 255, 255, 162, 61, 9, 24, 103, 195, 225, 177, 87, 15, 0, 42, 129, 222, 255, 233, 147, 78, 61, 104, 164, 185, 133, 39, 0, 11, 95, 205, 255, 255, 212, 91, 14, 31, 102, 167, 182, 142, 89, 59, 81, 134, 170, 176, 156, 117, 77, 84, 140, 193, 202, 163, 113, 81, 73, 91, 122, 149, 155, 127, 81, 55, 73, 149, 238, 255, 197, 109, 54, 50, 80, 134, 174, 165, 109, 40, 13, 58, 162, 255, 255, 220, 118, 50, 47, 73, 106, 132, 136, 111, 78, 78, 119, 170, 208, 211, 165, 102, 68, 75, 115, 152, 166, 152, 117, 89, 93, 131, 161, 151, 112, 79, 72, 81, 121, 175, 201, 192, 154, 113, 104, 132, 172, 171, 107, 29, 2, 41, 122, 189, 225, 233, 197, 134, 89, 87, 127, 173, 179, 120, 29, 0, 25, 118, 200, 246, 242, 187, 110, 44, 38, 103, 184, 230, 202, 114, 28, 3, 58, 150, 214, 229, 192, 112, 45, 41, 99, 179, 221, 200, 123, 36, 0, 35, 133, 230, 255, 229, 143, 57, 15, 46, 122, 178, 192, 161, 102, 49, 42, 100, 182, 233, 225, 165, 94, 57, 66, 107, 145, 153, 135, 110, 93, 93, 117, 163, 188, 171, 136, 105, 96, 107, 128, 145, 140, 126, 114, 105, 107, 116, 133, 147, 148, 136, 130, 140, 148, 144, 133, 118, 105, 103, 117, 136, 140, 131, 118, 97, 94, 120, 158, 189, 182, 142, 106, 87, 97, 121, 140, 148, 132, 110, 99, 100, 117, 149, 175, 167, 133, 99, 90, 111, 143, 165, 163, 138, 105, 81, 76, 97, 133, 164, 174, 146, 104, 90, 107, 139, 159, 155, 139, 115, 108, 117, 124, 130, 134, 130, 121, 111, 107, 119, 142, 154, 144, 124, 106, 103, 118, 141, 156, 152, 137, 124, 107, 97, 106, 125, 146, 151, 133, 108, 94, 108, 141, 166, 165, 138, 112, 105, 110, 117, 129, 147, 152, 145, 127, 103, 96, 113, 138, 150, 138, 117, 107, 106, 114, 125, 135, 152, 162, 153, 133, 114, 111, 125, 137, 131, 111, 99, 104, 114, 125, 133, 140, 145, 147, 138, 119, 113, 120, 134, 149, 148, 132, 116, 105, 104, 108, 116, 130, 138, 140, 136, 123, 115, 117, 128, 140, 146, 145, 138, 129, 123, 116, 113, 116, 122, 123, 119, 117, 115, 121, 137, 145, 145, 140, 133, 127, 123, 124, 127, 129, 130, 126, 121, 121, 122, 121, 119, 119, 123, 127, 133, 133, 127, 129, 130, 131, 136, 140, 141, 136, 126, 117, 110, 113, 121, 124, 121, 117, 115, 122, 135, 145, 148, 144, 136, 127, 119, 115, 117, 124, 134, 141, 137, 127, 119, 110, 109, 118, 124, 130, 137, 139, 138, 129, 122, 124, 130, 137, 139, 133, 127, 121, 117, 115, 113, 116, 127, 137, 137, 130, 125, 127, 133, 136, 137, 135, 128, 129, 126, 116, 113, 118, 128, 134, 127, 118, 116, 124, 133, 135, 136, 137, 137, 137, 131, 124, 124, 129, 130, 121, 109, 107, 115, 130, 139, 137, 126, 120, 123, 131, 142, 150, 147, 137, 127, 114, 105, 107, 117, 126, 129, 127, 124, 119, 122, 129, 134, 141, 145, 149, 148, 136, 123, 114, 113, 114, 109, 104, 105, 116, 135, 150, 149, 135, 127, 130, 135, 143, 148, 143, 131, 115, 102, 96, 103, 118, 134, 142, 138, 127, 122, 129, 139, 145, 146, 141, 131, 123, 119, 117, 117, 122, 126, 123, 115, 113, 116, 127, 141, 148, 146, 139, 129, 123, 124, 128, 129, 127, 125, 121, 117, 118, 125, 130, 132, 133, 132, 131, 130, 130, 129, 129, 127, 123, 123, 124, 127, 126, 124, 123, 122, 127, 135, 141, 141, 135, 125, 116, 112, 115, 123, 131, 135, 133, 127, 122, 125, 132, 139, 139, 132, 123, 119, 119, 119, 124, 132, 137, 135, 127, 119, 118, 123, 131, 137, 138, 131, 123, 119, 119, 125, 133, 139, 137, 130, 121, 116, 118, 125, 134, 139, 137, 129, 122, 119, 121, 127, 133, 131, 126, 123, 122, 124, 128, 132, 136, 135, 132, 126, 121, 122, 125, 128, 131, 130, 128, 125, 125, 124, 123, 125, 126, 127, 129, 132, 131, 130, 133, 135, 132, 127, 124, 122, 122, 121, 123, 126, 127, 127, 127, 127, 129, 130, 131, 131, 131, 132, 131, 127, 123, 121, 123, 125, 128, 132, 132, 130, 126, 122, 122, 123, 127, 131, 132, 132, 130, 130, 129, 127, 126, 125, 126, 126, 125, 126, 129, 129, 128, 127, 128, 131, 131, 128, 124, 122, 126, 127, 127, 128, 127, 129, 130, 130, 131, 131, 128, 125, 123, 122, 122, 125, 128, 130, 130, 128, 127, 129, 132, 133, 132, 129, 127, 124, 121, 119, 121, 127, 131, 132, 132, 132, 131, 130, 128, 125, 125, 126, 128, 128, 127, 126, 124, 123, 125, 126, 130, 133, 135, 134, 130, 126, 124, 124, 125, 125, 125, 126, 126, 125, 128, 130, 131, 131, 129, 129, 129, 128, 126, 125, 126, 125, 126, 126, 127, 129, 129, 130, 130, 130, 129, 127, 124, 123, 125, 127, 129, 131, 131, 129, 127, 127, 128, 129, 130, 128, 126, 127, 127, 127, 126, 127, 127, 125, 126, 126, 127, 129, 128, 129, 129, 127, 128, 128, 128, 127, 127, 127, 125, 125, 125, 127, 130, 129, 129, 129, 129, 130, 128, 126, 126, 127, 129, 128, 126, 125, 126, 130, 131, 129, 130, 131, 127, 125, 125, 125, 128, 128, 126, 127, 126, 127, 128, 129, 130, 128, 128, 126, 124, 125, 128, 130, 130, 129, 125, 121, 124, 127, 132, 133, 130, 130, 128, 128, 127, 126, 125, 125, 126, 126, 125, 127, 129, 132, 132, 131, 131, 128, 129, 129, 127, 125, 123, 122, 123, 124, 126, 129, 129, 131, 131, 131, 130, 128, 126, 126, 128, 127, 125, 124, 125, 127, 127, 126, 126, 129, 131, 131, 132, 131, 130, 128, 125, 124, 124, 126, 125, 126, 126, 128, 131, 131, 131, 129, 129, 128, 127, 127, 126, 124, 125, 125, 126, 128, 128, 128, 129, 129, 128, 128, 126, 125, 126, 128, 129, 129, 128, 125, 126, 129, 129, 129, 128, 128, 129, 129, 129, 129, 126, 124, 125, 126, 126, 126, 128, 129, 131, 132, 128, 127, 127, 127, 130, 129, 125, 125, 126, 126, 126, 126, 126, 127, 129, 131, 131, 131, 128, 126, 125, 126, 127, 128, 128, 128, 128, 126, 126, 127, 129, 131, 129, 128, 127, 126, 127, 127, 127, 127, 127, 129, 127, 125, 126, 126, 128, 129, 129, 129, 128, 128, 130, 129, 128, 128, 126, 125, 125, 125, 127, 129, 129, 129, 127, 127, 127, 128, 129, 130, 130, 128, 126, 125, 124, 124, 126, 129, 130, 129, 128, 128, 128, 129, 129, 128, 128, 128, 126, 125, 124, 127, 129, 128, 128, 127, 127, 129, 129, 129, 128, 128, 126, 126, 126, 127, 128, 129, 128, 126, 125, 126, 127, 128, 129, 130, 129, 129, 128, 127, 127, 127, 128, 128, 126, 127, 126, 126, 126, 127, 130, 130, 128, 127, 127, 128, 129, 130, 129, 127, 127, 125, 124, 125, 126, 128, 129, 130, 129, 130, 129, 127, 128, 126, 126, 127, 126, 126, 127, 128, 128, 129, 128, 127, 128, 127, 126, 127, 128, 128, 128, 128, 126, 126, 128, 128, 126, 127, 127, 128, 130, 128, 127, 128, 128, 128, 127, 126, 125, 126, 127, 128, 129, 130, 129, 129, 128, 128, 128, 127, 128, 126, 125, 126, 126, 126, 127, 129, 129, 129, 129, 128, 127, 127, 126, 125, 125, 127, 129, 129, 128, 126, 127, 127, 128, 129, 129, 128, 128, 128, 128, 127, 128, 127, 127, 127, 126, 127, 126, 128, 128, 129, 130, 129, 128, 126, 125, 126, 126, 128, 128, 127, 126, 126, 127, 128, 129, 129, 129, 128, 126, 127, 128, 128, 128, 128, 128, 128, 127, 126, 126, 127, 127, 129, 128, 127, 127, 127, 127, 127, 126, 127, 128, 128, 127, 129, 130, 130, 129, 129, 128, 126, 127, 127, 126, 127, 127, 127, 127, 127, 128, 129, 128, 127, 127, 128, 128, 127, 126, 127, 127, 128, 128, 128, 128, 128, 127, 127, 128, 129, 130, 130, 127, 125, 125, 126, 126, 127, 128, 128, 128, 127, 128, 130, 130, 130, 129, 126, 126, 125, 127, 127, 127, 127, 127, 128, 126, 127, 128, 128, 130, 130, 129, 126, 124, 125, 126, 128, 129, 128, 127, 126, 127, 128, 129, 130, 129, 128, 126, 125, 125, 126, 128, 129, 129, 129, 128, 126, 127, 128, 129, 130, 128, 126, 126, 126, 124, 126, 128, 129, 129, 129, 127, 125, 127, 129, 129, 129, 129, 127, 127, 127, 126, 127, 129, 129, 128, 127, 126, 125, 128, 129, 130, 129, 127, 126, 126, 126, 126, 127, 128, 129, 128, 128, 127, 127, 128, 129, 128, 126, 126, 127, 127, 128, 128, 127, 128, 129, 128, 128, 127, 127, 128, 127, 126, 127, 127, 128, 128, 127, 126, 126, 127, 127, 128, 127, 126, 127, 128, 129, 130, 129, 129, 128, 128, 128, 127, 126, 128, 128, 128, 127, 125, 127, 127, 126, 128, 128, 128, 128, 126, 127, 126, 127, 130, 129, 128, 127, 127, 127, 128, 128, 128, 129, 128, 128, 127, 126, 127, 127, 128, 128, 126, 126, 126, 127, 129, 130, 129, 127, 127, 125, 126, 128, 128, 128, 129, 127, 127, 127, 127, 128, 128, 128, 128, 127, 126, 126, 127, 128, 128, 129, 129, 129, 128, 127, 127, 127, 129, 129, 127, 126, 125, 126, 128, 128, 128, 127, 126, 126, 127, 129, 130, 130, 131, 129, 126, 126, 126, 126, 126, 126, 127, 127, 127, 128, 130, 130, 130, 130, 128, 127, 127, 126, 126, 127, 126, 126, 127, 127, 128, 129, 130, 128, 127, 127, 126, 126, 125, 125, 127, 128, 128, 129, 130, 129, 128, 128, 128, 128, 128, 128, 129, 126, 126, 127, 125, 126, 128, 128, 130, 130, 128, 128, 128, 126, 126, 127, 127, 128, 128, 128, 129, 128, 127, 126, 125, 126, 127, 128, 128, 129, 129, 129, 129, 128, 127, 128, 128, 126, 127, 128, 127, 127, 125, 126, 129, 129, 129, 129, 128, 127, 128, 127, 126, 128, 129, 128, 126, 125, 125, 126, 128, 130, 129, 128, 129, 128, 128, 128, 127, 126, 124, 124, 126, 128, 129, 130, 132, 131, 129, 128, 129, 127, 127, 126, 125, 125, 126, 127, 128, 129, 129, 130, 128, 124, 124, 123, 125, 129, 129, 129, 130, 129, 129, 129, 129, 128, 126, 124, 125, 128, 128, 128, 130, 132, 131, 129, 128, 126, 124, 124, 124, 123, 125, 128, 132, 133, 130, 128, 127, 124, 126, 128, 128, 127, 126, 127, 129, 129, 128, 125, 125, 125, 127, 131, 134, 134, 133, 131, 125, 123, 123, 123, 127, 126, 125, 127, 125, 127, 130, 131, 132, 133, 130, 127, 122, 119, 120, 122, 125, 128, 130, 137, 142, 142, 136, 126, 120, 118, 117, 117, 119, 124, 129, 134, 135, 134, 135, 137, 132, 127, 123, 117, 116, 118, 121, 127, 129, 129, 129, 130, 136, 145, 150, 144, 129, 115, 107, 107, 113, 119, 126, 131, 130, 130, 133, 132, 137, 140, 134, 128, 118, 115, 118, 119, 123, 126, 131, 143, 149, 143, 136, 125, 116, 111, 106, 112, 125, 130, 134, 134, 132, 137, 142, 140, 132, 118, 108, 111, 119, 123, 127, 129, 132, 145, 156, 154, 145, 129, 109, 97, 93, 98, 117, 134, 140, 140, 140, 142, 143, 141, 133, 121, 110, 105, 108, 118, 125, 135, 155, 163, 149, 130, 117, 112, 110, 105, 107, 119, 129, 135, 140, 144, 149, 148, 129, 112, 108, 108, 114, 122, 126, 140, 157, 152, 142, 135, 121, 112, 104, 100, 112, 118, 121, 139, 149, 148, 154, 150, 135, 118, 97, 93, 105, 111, 121, 133, 142, 162, 169, 152, 140, 128, 105, 94, 93, 98, 115, 130, 142, 157, 159, 148, 132, 114, 106, 112, 117, 126, 139, 139, 135, 133, 131, 136, 134, 122, 111, 105, 106, 118, 130, 141, 155, 152, 132, 114, 109, 115, 123, 136, 150, 146, 130, 117, 109, 114, 133, 139, 129, 121, 112, 112, 124, 137, 147, 143, 128, 118, 113, 119, 143, 160, 150, 132, 109, 98, 111, 122, 128, 136, 132, 122, 120, 123, 137, 150, 135, 118, 114, 110, 126, 149, 154, 147, 131, 111, 104, 107, 114, 134, 141, 131, 124, 121, 129, 140, 134, 125, 123, 119, 124, 140, 144, 139, 131, 116, 108, 112, 119, 131, 140, 135, 125, 122, 127, 133, 132, 125, 124, 127, 138, 145, 137, 129, 120, 107, 102, 113, 126, 134, 143, 146, 137, 129, 124, 117, 116, 123, 130, 137, 146, 142, 129, 118, 112, 112, 116, 121, 127, 134, 140, 139, 131, 124, 123, 114, 114, 139, 161, 163, 143, 110, 91, 91, 102, 124, 148, 152, 137, 122, 125, 137, 134, 125, 120, 124, 132, 133, 134, 136, 131, 117, 102, 106, 125, 137, 137, 138, 139, 135, 125, 112, 112, 126, 134, 133, 137, 145, 142, 130, 113, 104, 110, 116, 125, 136, 144, 146, 138, 130, 125, 113, 101, 108, 133, 160, 167, 145, 119, 104, 97, 100, 116, 140, 152, 152, 145, 132, 119, 102, 93, 105, 134, 169, 179, 152, 117, 94, 88, 99, 118, 142, 164, 157, 133, 120, 118, 110, 93, 106, 145, 168, 166, 143, 119, 106, 92, 92, 124, 153, 154, 143, 134, 127, 111, 96, 107, 138, 161, 157, 130, 111, 111, 122, 129, 131, 131, 124, 111, 111, 134, 157, 159, 139, 109, 97, 96, 97, 130, 181, 189, 152, 109, 79, 83, 105, 123, 153, 175, 164, 136, 107, 84, 80, 106, 152, 185, 176, 140, 101, 85, 96, 117, 141, 149, 143, 140, 128, 118, 119, 118, 121, 122, 116, 126, 156, 167, 145, 113, 90, 96, 118, 135, 149, 159, 146, 112, 86, 95, 132, 164, 167, 143, 113, 101, 107, 115, 131, 147, 148, 129, 112, 118, 128, 128, 131, 138, 135, 111, 92, 123, 173, 173, 131, 96, 92, 110, 126, 144, 158, 146, 122, 99, 90, 110, 147, 176, 174, 140, 103, 80, 84, 112, 143, 167, 166, 140, 116, 99, 95, 116, 141, 144, 142, 142, 134, 118, 106, 113, 133, 143, 136, 128, 125, 115, 109, 114, 130, 156, 165, 145, 117, 94, 95, 113, 133, 159, 161, 134, 103, 101, 129, 138, 122, 127, 147, 147, 116, 84, 106, 163, 175, 141, 100, 86, 112, 134, 147, 163, 152, 120, 83, 72, 118, 171, 191, 166, 109, 75, 75, 101, 148, 179, 175, 142, 102, 93, 114, 125, 138, 151, 137, 103, 75, 100, 165, 187, 163, 129, 106, 99, 99, 123, 159, 161, 126, 85, 78, 114, 160, 181, 161, 121, 90, 91, 108, 132, 157, 164, 160, 147, 117, 82, 71, 101, 143, 148, 127, 127, 152, 156, 135, 123, 126, 129, 117, 113, 130, 137, 125, 103, 98, 126, 159, 162, 133, 105, 105, 118, 128, 140, 155, 152, 140, 134, 124, 99, 70, 80, 124, 142, 139, 151, 178, 178, 139, 105, 102, 112, 111, 111, 124, 131, 129, 120, 112, 128, 156, 172, 155, 116, 89, 86, 108, 140, 157, 152, 142, 146, 146, 112, 64, 59, 100, 136, 150, 164, 185, 189, 153, 108, 90, 96, 108, 115, 118, 120, 122, 117, 110, 129, 164, 188, 176, 135, 105, 95, 92, 103, 120, 134, 143, 151, 157, 141, 101, 69, 74, 110, 149, 175, 187, 181, 149, 114, 96, 98, 106, 106, 107, 122, 136, 135, 124, 114, 112, 129, 164, 194, 191, 146, 93, 71, 74, 88, 117, 154, 171, 154, 117, 85, 79, 96, 135, 189, 212, 181, 130, 94, 93, 114, 127, 124, 109, 86, 71, 82, 121, 175, 220, 227, 184, 119, 74, 59, 74, 105, 134, 150, 136, 113, 126, 164, 180, 151, 106, 85, 80, 77, 93, 143, 202, 213, 172, 132, 115, 114, 108, 91, 84, 86, 82, 85, 113, 170, 231, 247, 201, 126, 73, 57, 59, 77, 110, 134, 140, 142, 168, 200, 183, 119, 69, 63, 81, 99, 123, 161, 187, 174, 141, 130, 145, 150, 127, 89, 67, 69, 83, 105, 132, 153, 171, 185, 190, 177, 148, 117, 88, 67, 68, 96, 126, 138, 139, 136, 132, 129, 138, 155, 161, 145, 121, 108, 107, 114, 124, 134, 138, 129, 114, 110, 122, 134, 135, 127, 118, 112, 115, 134, 163, 174, 158, 127, 100, 94, 112, 134, 140, 124, 102, 89, 88, 107, 152, 192, 197, 168, 133, 110, 108, 119, 124, 113, 93, 80, 83, 99, 131, 176, 205, 194, 157, 120, 103, 106, 112, 109, 96, 88, 96, 118, 151, 182, 192, 170, 126, 92, 87, 100, 119, 129, 127, 124, 124, 126, 135, 158, 179, 170, 127, 81, 60, 74, 108, 137, 152, 154, 151, 147, 141, 142, 150, 148, 121, 87, 71, 82, 110, 139, 153, 147, 136, 133, 138, 144, 150, 152, 140, 116, 97, 90, 95, 111, 130, 136, 128, 122, 132, 149, 159, 160, 150, 131, 113, 102, 99, 100, 109, 122, 131, 134, 138, 146, 149, 142, 129, 121, 121, 123, 125, 125, 123, 121, 121, 127, 136, 139, 135, 126, 117, 111, 110, 117, 132, 145, 152, 147, 136, 127, 124, 123, 118, 112, 110, 115, 123, 132, 139, 140, 137, 133, 129, 126, 126, 130, 132, 129, 123, 120, 121, 123, 129, 132, 129, 124, 121, 122, 124, 129, 135, 140, 140, 134, 127, 121, 118, 121, 127, 128, 125, 122, 126, 131, 132, 133, 134, 131, 124, 120, 118, 120, 126, 134, 140, 138, 133, 128, 126, 123, 120, 118, 120, 125, 129, 130, 129, 128, 131, 132, 128, 124, 126, 132, 136, 133, 127, 125, 125, 127, 128, 124, 121, 121, 122, 123, 126, 131, 138, 144, 143, 135, 127, 120, 115, 113, 115, 119, 124, 128, 133, 137, 139, 141, 138, 132, 124, 117, 112, 114, 120, 129, 136, 138, 134, 130, 128, 128, 128, 128, 128, 124, 121, 122, 127, 131, 132, 130, 126, 124, 124, 126, 126, 126, 128, 132, 135, 138, 137, 131, 122, 116, 116, 120, 123, 124, 127, 131, 132, 130, 129, 132, 136, 138, 135, 128, 121, 118, 119, 120, 123, 126, 128, 128, 127, 128, 131, 132, 132, 132, 134, 135, 135, 131, 125, 119, 114, 115, 120, 124, 127, 131, 132, 132, 130, 128, 129, 132, 132, 131, 128, 126, 126, 127, 127, 126, 125, 124, 123, 121, 121, 123, 126, 130, 133, 135, 138, 140, 137, 131, 126, 123, 120, 118, 117, 121, 126, 129, 129, 128, 129, 130, 129, 128, 128, 128, 129, 129, 130, 132, 132, 130, 128, 125, 123, 122, 121, 121, 122, 125, 127, 129, 131, 130, 129, 130, 131, 133, 133, 133, 132, 130, 128, 125, 122, 122, 122, 121, 122, 124, 127, 130, 132, 131, 130, 131, 130, 128, 127, 128, 129, 129, 128, 128, 128, 128, 128, 126, 124, 123, 122, 122, 122, 124, 129, 134, 136, 135, 133, 131, 128, 126, 124, 124, 125, 125, 126, 128, 128, 128, 128, 128, 128, 127, 126, 126, 127, 129, 129, 129, 130, 130, 128, 127, 127, 127, 126, 126, 125, 126, 128, 128, 129, 130, 131, 129, 126, 124, 122, 123, 126, 127, 128, 129, 131, 130, 129, 128, 127, 127, 128, 127, 128, 129, 129, 128, 128, 129, 130, 129, 127, 125, 125, 126, 127, 128, 127, 127, 128, 129, 129, 128, 128, 127, 127, 126, 125, 126, 128, 128, 128, 128, 127, 127, 128, 130, 130, 129, 128, 128, 127, 127, 127, 126, 126, 127, 126, 126, 128, 129, 128, 128, 128, 129, 129, 128, 127, 126, 127, 127, 126, 127, 127, 127, 126, 127, 128, 129, 130, 130, 129, 129, 128, 126, 127, 127, 126, 126, 126, 126, 126, 126, 128, 129, 129, 130, 129, 128, 128, 127, 126, 126, 126, 127, 127, 128, 128, 127, 127, 128, 128, 129, 129, 129, 128, 127, 126, 127, 128, 128, 128, 128, 128, 129, 128, 126, 126, 126, 127, 127, 127, 129, 130, 130, 128, 126, 126, 127, 127, 127, 127, 127, 126, 127, 129, 130, 128, 128, 128, 127, 127, 127, 127, 126, 127, 127, 128, 129, 129, 128, 127, 126, 126, 127, 129, 128, 127, 127, 127, 128, 130, 130, 128, 127, 125, 124, 125, 127, 129, 129, 130, 130, 128, 128, 127, 127, 128, 127, 126, 126, 127, 129, 129, 127, 126, 127, 128, 130, 128, 127, 128, 127, 127, 127, 128, 129, 129, 128, 127, 126, 126, 126, 126, 127, 128, 129, 130, 129, 127, 127, 126, 125, 127, 127, 128, 128, 128, 129, 128, 128, 128, 127, 127, 127, 128, 129, 129, 129, 128, 127, 127, 127, 129, 128, 127, 126, 125, 125, 127, 129, 128, 129, 129, 127, 127, 127, 127, 126, 126, 128, 129, 129, 128, 129, 129, 128, 126, 125, 127, 127, 127, 128, 128, 129, 129, 128, 127, 127, 128, 127, 127, 126, 126, 128, 128, 128, 128, 129, 128, 127, 127, 126, 125, 126, 127, 128, 128, 128, 128, 127, 126, 127, 128, 128, 128, 128, 129, 128, 128, 129, 128, 128, 128, 127, 125, 126, 127, 127, 127, 127, 128, 129, 129, 129, 127, 126, 125, 126, 129, 128, 128, 127, 127, 128, 127, 127, 127, 129, 128, 127, 128, 128, 130, 129, 128, 127, 126, 127, 126, 125, 126, 127, 128, 128, 128, 128, 129, 128, 127, 127, 126, 127, 127, 128, 128, 127, 128, 127, 128, 128, 128, 129, 127, 127, 127, 127, 129, 129, 128, 128, 127, 126, 125, 126, 128, 128, 128, 128, 128, 128, 129, 129, 128, 128, 127, 126, 126, 127, 128, 128, 127, 126, 126, 126, 127, 128, 129, 128, 127, 128, 128, 128, 129, 128, 126, 127, 126, 126, 127, 128, 130, 129, 128, 128, 127, 128, 128, 127, 126, 126, 126, 127, 129, 128, 127, 128, 127, 127, 127, 127, 126, 127, 127, 128, 130, 129, 129, 128, 127, 127, 124, 125, 127, 126, 128, 128, 129, 130, 129, 128, 127, 128, 128, 127, 127, 126, 127, 127, 128, 129, 130, 129, 128, 126, 125, 126, 127, 128, 128, 128, 129, 128, 127, 127, 127, 126, 126, 127, 127, 127, 127, 128, 129, 129, 129, 129, 128, 126, 126, 126, 126, 128, 128, 129, 129, 128, 129, 127, 127, 126, 126, 127, 126, 128, 129, 128, 128, 127, 127, 127, 127, 127, 128, 128, 128, 129, 128, 128, 127, 128, 129, 127, 127, 126, 127, 127, 126, 128, 127, 128, 129, 128, 128, 127, 126, 127, 126, 128, 130, 129, 129, 129, 128, 126, 124, 126, 127, 127, 128, 129, 129, 129, 128, 129, 127, 126, 126, 128, 129, 128, 128, 127, 127, 127, 127, 128, 127, 127, 128, 126, 127, 127, 127, 129, 129, 128, 128, 128, 127, 127, 126, 126, 126, 127, 128, 129, 129, 129, 128, 126, 126, 127, 127, 128, 129, 128, 128, 128, 128, 126, 127, 128, 128, 128, 126, 126, 128, 129, 128, 128, 127, 128, 128, 127, 127, 126, 127, 129, 127, 126, 126, 128, 127, 128, 128, 127, 129, 128, 126, 127, 127, 128, 129, 129, 127, 128, 127, 127, 127, 126, 128, 128, 128, 128, 128, 128, 127, 127, 127, 128, 129, 128, 128, 127, 128, 128, 128, 128, 127, 126, 127, 129, 128, 127, 127, 127, 128, 127, 127, 128, 128, 128, 127, 127, 128, 128, 129, 127, 126, 127, 128, 127, 127, 127, 127, 128, 128, 127, 128, 128, 127, 128, 128, 127, 127, 127, 127, 128, 127, 129, 129, 127, 127, 127, 126, 127, 127, 128, 129, 128, 127, 127, 127, 128, 127, 127, 127, 128, 130, 128, 127, 127, 127, 128, 127, 127, 127, 127, 128, 127, 126, 127, 128, 128, 129, 128, 127, 127, 127, 128, 128, 128, 128, 128, 128, 126, 128, 127, 127, 128, 126, 127, 127, 128, 127, 127, 127, 127, 128, 128, 128, 128, 128, 129, 126, 126, 128, 129, 129, 128, 127, 127, 128, 128, 126, 127, 128, 128, 127, 125, 126, 127, 129, 128, 128, 128, 128, 128, 126, 126, 128, 128, 128, 128, 128, 128, 128, 127, 126, 126, 128, 127, 128, 129, 127, 129, 128, 127, 127, 128, 129, 128, 129, 126, 126, 127, 126, 127, 127, 127, 130, 130, 129, 128, 126, 126, 129, 128, 125, 128, 128, 128, 126, 126, 128, 129, 129, 128, 127, 127, 125, 125, 126, 127, 128, 130, 129, 129, 129, 127, 127, 126, 127, 126, 126, 128, 127, 128, 130, 130, 127, 127, 128, 126, 126, 127, 126, 127, 128, 127, 127, 130, 128, 129, 129, 128, 127, 125, 125, 126, 126, 127, 127, 128, 129, 129, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 127, 128, 126, 126, 127, 128, 129, 127, 127, 127, 127, 127, 127, 128, 128, 129, 128, 127, 127, 127, 128, 128, 128, 127, 127, 128, 126, 127, 127, 128, 129, 128, 128, 128, 128, 128, 129, 129, 128, 128, 128, 127, 127, 127, 125, 125, 127, 126, 126, 127, 128, 130, 129, 128, 127, 127, 127, 126, 127, 127, 128, 128, 128, 128, 128, 127, 127, 128, 127, 128, 127, 128, 129, 129, 128, 128, 128, 128, 126, 125, 125, 127, 126, 128, 129, 128, 129, 129, 127, 128, 127, 127, 128, 128, 127, 128, 128, 128, 127, 128, 131, 129, 127, 126, 126, 126, 124, 126, 125, 127, 129, 128, 130, 130, 130, 128, 127, 129, 126, 125, 125, 126, 128, 129, 129, 128, 128, 130, 128, 127, 126, 126, 127, 128, 128, 127, 129, 131, 130, 128, 126, 125, 125, 125, 125, 125, 128, 130, 129, 130, 128, 128, 127, 126, 128, 127, 130, 128, 125, 127, 128, 130, 129, 130, 129, 126, 129, 127, 123, 125, 127, 129, 127, 127, 124, 126, 131, 128, 126, 128, 128, 128, 128, 126, 126, 129, 129, 128, 129, 127, 127, 128, 129, 127, 126, 127, 128, 128, 126, 128, 128, 127, 129, 128, 127, 127, 126, 125, 127, 129, 128, 129, 129, 127, 124, 125, 128, 128, 129, 130, 130, 129, 126, 126, 126, 126, 128, 129, 130, 132, 127, 126, 128, 128, 127, 126, 126, 126, 127, 126, 121, 125, 129, 129, 131, 129, 129, 129, 131, 130, 127, 128, 126, 127, 125, 122, 122, 126, 132, 130, 130, 129, 129, 132, 127, 126, 126, 124, 124, 124, 127, 127, 131, 131, 129, 130, 126, 125, 126, 127, 127, 129, 130, 128, 131, 130, 128, 128, 126, 125, 123, 124, 124, 126, 128, 128, 131, 130, 130, 129, 126, 126, 123, 127, 130, 130, 128, 128, 130, 127, 128, 124, 125, 133, 129, 125, 126, 128, 126, 127, 127, 124, 127, 125, 124, 131, 132, 130, 130, 130, 129, 130, 126, 124, 127, 125, 125, 127, 128, 130, 129, 130, 130, 126, 123, 124, 127, 125, 127, 128, 129, 131, 129, 129, 129, 128, 127, 127, 128, 127, 128, 128, 129, 128, 125, 126, 125, 125, 127, 128, 127, 127, 128, 127, 129, 128, 125, 130, 129, 127, 128, 129, 129, 128, 131, 129, 128, 128, 124, 126, 124, 123, 125, 124, 129, 131, 129, 128, 131, 131, 125, 125, 126, 127, 127, 126, 128, 129, 131, 129, 129, 128, 124, 126, 126, 125, 124, 123, 129, 131, 130, 129, 130, 132, 129, 126, 124, 125, 128, 127, 128, 128, 130, 130, 129, 129, 128, 127, 128, 127, 127, 127, 128, 128, 128, 126, 123, 125, 127, 126, 124, 126, 130, 128, 126, 126, 126, 127, 128, 129, 130, 131, 131, 130, 128, 127, 127, 127, 127, 127, 128, 128, 125, 126, 126, 126, 127, 124, 124, 129, 126, 127, 130, 133, 134, 130, 123, 124, 131, 128, 126, 131, 131, 130, 127, 124, 126, 127, 124, 121, 123, 123, 125, 129, 131, 132, 133, 135, 132, 126, 124, 123, 125, 123, 123, 127, 130, 133, 130, 131, 131, 127, 128, 127, 126, 126, 125, 127, 129, 129, 128, 127, 129, 128, 126, 124, 123, 126, 129, 130, 129, 129, 129, 125, 123, 124, 125, 131, 132, 128, 129, 129, 130, 130, 128, 128, 130, 131, 127, 124, 121, 121, 125, 125, 127, 129, 130, 129, 129, 129, 127, 128, 130, 127, 126, 126, 128, 128, 128, 127, 124, 129, 131, 128, 128, 129, 130, 130, 128, 121, 119, 124, 126, 124, 127, 131, 135, 135, 130, 128, 127, 127, 127, 124, 125, 127, 127, 128, 130, 131, 132, 132, 128, 126, 125, 122, 122, 123, 125, 126, 128, 131, 130, 130, 127, 125, 127, 126, 128, 130, 129, 128, 130, 132, 130, 129, 128, 126, 125, 124, 124, 123, 124, 127, 130, 130, 129, 130, 129, 129, 127, 124, 127, 129, 127, 127, 129, 127, 125, 129, 129, 128, 128, 127, 126, 128, 129, 128, 130, 128, 127, 127, 122, 123, 124, 129, 128, 124, 130, 133, 134, 130, 124, 127, 127, 127, 124, 126, 129, 128, 132, 128, 128, 128, 125, 127, 126, 127, 126, 127, 128, 127, 131, 130, 129, 128, 127, 130, 124, 123, 123, 124, 127, 128, 131, 130, 131, 129, 126, 124, 121, 125, 129, 129, 128, 130, 131, 132, 132, 128, 129, 129, 126, 124, 124, 128, 125, 124, 126, 127, 130, 127, 128, 126, 129, 130, 123, 128, 130, 133, 133, 122, 122, 126, 129, 128, 127, 131, 131, 134, 127, 121, 126, 126, 126, 127, 127, 125, 125, 125, 124, 132, 134, 132, 132, 128, 127, 127, 128, 124, 124, 127, 126, 125, 125, 128, 131, 129, 129, 129, 129, 129, 128, 128, 129, 129, 126, 123, 121, 123, 127, 127, 130, 131, 130, 130, 128, 125, 124, 129, 131, 126, 124, 125, 128, 129, 126, 128, 133, 134, 132, 128, 126, 127, 125, 121, 122, 125, 125, 127, 129, 130, 132, 133, 131, 128, 127, 126, 123, 123, 125, 127, 129, 129, 132, 130, 129, 127, 124, 125, 124, 125, 127, 128, 127, 128, 132, 133, 130, 131, 128, 121, 122, 125, 126, 127, 129, 132, 133, 133, 130, 125, 125, 124, 123, 121, 120, 126, 130, 131, 132, 133, 134, 130, 127, 125, 124, 123, 123, 125, 126, 130, 131, 132, 132, 129, 127, 126, 125, 123, 125, 130, 130, 128, 128, 130, 130, 128, 129, 127, 126, 125, 124, 125, 125, 126, 128, 132, 131, 127, 127, 127, 127, 126, 128, 128, 128, 131, 126, 125, 127, 126, 128, 128, 128, 124, 125, 128, 129, 131, 129, 130, 130, 128, 126, 124, 125, 124, 125, 127, 127, 130, 133, 133, 132, 131, 128, 125, 124, 121, 121, 124, 126, 128, 131, 133, 134, 131, 129, 128, 125, 122, 121, 122, 125, 126, 130, 133, 133, 131, 128, 127, 125, 125, 125, 124, 127, 128, 129, 130, 131, 133, 131, 131, 129, 126, 124, 121, 121, 122, 127, 130, 130, 130, 128, 130, 129, 128, 126, 125, 129, 128, 127, 127, 128, 130, 127, 127, 123, 123, 126, 123, 126, 132, 131, 130, 133, 133, 128, 127, 124, 123, 125, 124, 124, 126, 129, 132, 133, 131, 128, 128, 127, 126, 126, 125, 125, 128, 129, 128, 129, 130, 130, 129, 125, 121, 122, 126, 125, 127, 131, 132, 132, 130, 129, 128, 126, 126, 126, 126, 127, 129, 130, 128, 130, 131, 127, 126, 126, 123, 122, 125, 125, 127, 133, 132, 132, 133, 129, 126, 125, 122, 121, 124, 126, 126, 130, 133, 134, 133, 129, 128, 125, 123, 121, 120, 123, 125, 130, 135, 135, 136, 135, 130, 125, 121, 117, 120, 122, 122, 128, 133, 136, 134, 132, 130, 127, 125, 122, 123, 122, 123, 129, 131, 136, 135, 132, 130, 124, 123, 121, 121, 122, 124, 127, 129, 135, 134, 131, 129, 124, 125, 125, 124, 122, 123, 131, 133, 134, 133, 132, 134, 129, 124, 119, 120, 122, 123, 127, 128, 131, 133, 130, 129, 130, 128, 124, 127, 125, 123, 128, 128, 128, 133, 134, 128, 127, 124, 118, 123, 126, 125, 127, 130, 131, 132, 133, 129, 128, 126, 124, 125, 127, 128, 124, 125, 129, 130, 130, 127, 128, 129, 129, 129, 126, 129, 130, 128, 127, 125, 126, 125, 126, 125, 126, 127, 126, 129, 129, 130, 128, 128, 127, 124, 125, 125, 127, 128, 133, 137, 129, 129, 128, 126, 127, 123, 124, 125, 127, 127, 127, 131, 130, 128, 127, 128, 127, 125, 126, 125, 129, 131, 129, 128, 128, 129, 126, 125, 125, 127, 131, 131, 132, 130, 128, 126, 123, 123, 123, 124, 125, 125, 129, 132, 133, 133, 133, 130, 126, 125, 121, 120, 121, 123, 127, 130, 132, 134, 136, 135, 131, 129, 126, 122, 121, 122, 124, 125, 126, 129, 131, 131, 130, 128, 125, 125, 126, 124, 122, 127, 133, 135, 134, 130, 127, 128, 126, 122, 123, 125, 126, 127, 129, 130, 131, 129, 128, 129, 127, 123, 123, 125, 126, 128, 127, 129, 132, 133, 132, 130, 127, 127, 124, 123, 124, 125, 127, 127, 129, 131, 130, 130, 126, 125, 128, 127, 124, 124, 128, 129, 130, 129, 125, 131, 132, 123, 123, 126, 126, 128, 130, 129, 131, 134, 129, 126, 129, 126, 123, 126, 124, 120, 125, 128, 129, 131, 131, 130, 131, 126, 124, 127, 127, 128, 131, 130, 131, 131, 127, 124, 128, 128, 125, 125, 123, 125, 126, 125, 127, 131, 132, 127, 126, 127, 126, 128, 127, 126, 129, 131, 129, 128, 130, 126, 127, 129, 128, 129, 127, 126, 126, 129, 131, 127, 126, 121, 123, 127, 124, 128, 129, 131, 132, 133, 130, 126, 129, 126, 123, 122, 122, 130, 129, 127, 130, 132, 130, 127, 127, 125, 129, 128, 126, 131, 129, 129, 128, 125, 125, 125, 125, 123, 126, 127, 127, 133, 132, 131, 130, 127, 126, 130, 126, 120, 124, 128, 129, 132, 131, 132, 132, 131, 125, 123, 123, 119, 123, 126, 127, 130, 132, 133, 131, 131, 127, 122, 128, 125, 124, 129, 127, 127, 131, 132, 130, 130, 126, 122, 127, 126, 124, 127, 125, 124, 125, 126, 128, 129, 130, 129, 133, 135, 128, 125, 126, 126, 125, 123, 124, 126, 129, 129, 129, 132, 130, 129, 129, 128, 130, 127, 127, 127, 124, 124, 126, 127, 127, 130, 129, 127, 126, 125, 125, 125, 127, 131, 130, 130, 130, 130, 130, 127, 125, 127, 128, 125, 128, 128, 125, 127, 125, 124, 125, 127, 128, 129, 128, 126, 131, 132, 131, 132, 128, 126, 126, 126, 126, 126, 129, 127, 130, 129, 125, 127, 124, 126, 127, 125, 128, 127, 127, 131, 130, 127, 131, 132, 123, 125, 127, 122, 126, 128, 127, 133, 133, 130, 129, 128, 125, 126, 127, 127, 128, 126, 126, 128, 127, 126, 124, 124, 126, 126, 128, 128, 127, 128, 128, 128, 129, 128, 127, 131, 131, 128, 128, 127, 129, 129, 125, 125, 127, 126, 124, 127, 127, 127, 131, 127, 128, 130, 129, 129, 128, 129, 127, 128, 124, 122, 129, 126, 128, 131, 129, 131, 129, 129, 125, 127, 129, 124, 125, 125, 128, 127, 125, 126, 125, 130, 128, 131, 139, 130, 123, 122, 125, 124, 126, 129, 127, 135, 133, 129, 133, 129, 125, 124, 125, 120, 119, 126, 127, 130, 130, 128, 131, 130, 130, 128, 126, 124, 124, 127, 128, 131, 131, 132, 133, 133, 130, 123, 121, 120, 122, 125, 127, 130, 132, 133, 131, 130, 127, 125, 124, 122, 125, 125, 127, 130, 132, 136, 130, 127, 125, 125, 124, 121, 125, 126, 133, 135, 132, 135, 125, 120, 123, 127, 124, 119, 126, 127, 132, 131, 128, 135, 133, 131, 126, 124, 124, 121, 127, 127, 130, 133, 134, 133, 125, 124, 122, 121, 122, 121, 131, 133, 132, 131, 128, 128, 127, 130, 126, 124, 127, 127, 130, 129, 130, 131, 132, 131, 126, 123, 120, 119, 123, 127, 130, 130, 131, 132, 131, 129, 127, 126, 124, 125, 126, 124, 124, 127, 130, 132, 133, 131, 128, 128, 126, 125, 125, 124, 126, 127, 126, 127, 129, 128, 127, 126, 126, 128, 130, 128, 128, 131, 128, 127, 128, 129, 129, 129, 129, 126, 127, 127, 124, 126, 124, 125, 131, 132, 129, 126, 125, 124, 125, 122, 126, 137, 135, 131, 130, 127, 127, 128, 123, 122, 129, 127, 124, 127, 126, 126, 130, 132, 128, 127, 127, 122, 125, 127, 129, 131, 130, 131, 130, 128, 124, 125, 127, 127, 128, 122, 126, 133, 130, 132, 128, 128, 129, 126, 124, 124, 128, 123, 126, 129, 127, 132, 130, 130, 128, 126, 129, 129, 131, 124, 119, 125, 127, 124, 121, 127, 132, 135, 135, 126, 128, 128, 125, 125, 124, 126, 127, 131, 130, 130, 131, 127, 128, 127, 126, 123, 122, 125, 124, 128, 129, 130, 130, 128, 131, 127, 126, 125, 125, 131, 129, 130, 127, 128, 130, 128, 132, 127, 124, 125, 122, 124, 125, 129, 131, 131, 133, 130, 130, 127, 125, 126, 123, 122, 121, 127, 131, 131, 133, 132, 132, 133, 129, 125, 125, 123, 123, 123, 122, 123, 128, 129, 130, 132, 128, 126, 128, 125, 125, 127, 129, 133, 132, 131, 131, 132, 130, 126, 126, 121, 120, 123, 122, 124, 126, 128, 130, 133, 134, 131, 131, 128, 127, 125, 124, 126, 126, 126, 126, 126, 126, 129, 133, 130, 130, 129, 126, 123, 122, 128, 127, 126, 128, 127, 132, 133, 129, 126, 125, 128, 126, 125, 126, 129, 131, 130, 132, 123, 118, 124, 126, 128, 129, 133, 134, 135, 134, 123, 122, 124, 122, 124, 123, 126, 127, 129, 130, 129, 131, 129, 131, 128, 124, 129, 123, 120, 127, 132, 132, 133, 135, 133, 134, 127, 120, 121, 121, 122, 122, 126, 127, 129, 133, 129, 130, 130, 128, 127, 124, 123, 124, 127, 125, 130, 134, 132, 133, 129, 124, 125, 127, 126, 125, 129, 127, 130, 130, 128, 129, 127, 127, 125, 128, 125, 121, 132, 132, 127, 126, 127, 129, 129, 130, 128, 130, 129, 124, 126, 125, 125, 126, 126, 126, 121, 125, 126, 127, 129, 130, 134, 132, 135, 132, 127, 128, 125, 122, 123, 126, 128, 131, 132, 128, 129, 128, 125, 125, 124, 125, 126, 128, 127, 129, 129, 131, 132, 126, 127, 128, 126, 127, 127, 129, 128, 128, 127, 127, 126, 122, 126, 124, 122, 127, 127, 128, 133, 137, 137, 135, 128, 119, 126, 123, 117, 122, 125, 132, 135, 134, 135, 135, 130, 122, 120, 117, 118, 123, 124, 131, 137, 135, 135, 135, 133, 129, 123, 116, 116, 121, 124, 127, 130, 129, 132, 139, 135, 126, 125, 128, 124, 123, 121, 123, 132, 132, 127, 131, 133, 130, 127, 129, 126, 124, 126, 122, 125, 129, 129, 128, 127, 128, 128, 126, 125, 124, 127, 131, 131, 128, 127, 128, 131, 130, 126, 125, 129, 129, 123, 125, 131, 133, 130, 124, 123, 124, 124, 127, 128, 130, 132, 132, 130, 130, 129, 126, 128, 124, 121, 124, 124, 125, 130, 131, 130, 129, 128, 123, 125, 127, 122, 124, 126, 128, 133, 132, 131, 135, 135, 133, 129, 125, 120, 120, 123, 123, 125, 126, 128, 131, 131, 133, 131, 127, 126, 125, 124, 121, 122, 128, 132, 131, 132, 133, 131, 129, 128, 125, 123, 122, 122, 122, 124, 128, 129, 133, 136, 135, 133, 131, 127, 121, 117, 117, 120, 124, 128, 130, 135, 139, 136, 130, 129, 126, 124, 123, 122, 124, 126, 129, 132, 132, 129, 127, 125, 122, 125, 128, 126, 127, 130, 130, 129, 124, 125, 129, 127, 126, 129, 133, 132, 130, 129, 127, 129, 123, 117, 124, 127, 128, 129, 130, 131, 133, 132, 125, 125, 126, 125, 124, 122, 124, 128, 133, 134, 131, 131, 130, 129, 127, 122, 122, 126, 123, 119, 125, 128, 131, 135, 132, 129, 130, 128, 124, 126, 127, 125, 129, 127, 128, 129, 128, 128, 125, 127, 129, 130, 128, 126, 131, 130, 127, 125, 125, 127, 124, 125, 125, 125, 129, 131, 132, 132, 131, 126, 125, 125, 118, 120, 126, 129, 135, 136, 133, 132, 130, 127, 128, 127, 123, 123, 125, 128, 130, 127, 127, 130, 127, 123, 122, 122, 125, 126, 128, 132, 132, 134, 133, 132, 129, 123, 121, 123, 125, 126, 127, 131, 131, 132, 129, 128, 129, 125, 122, 120, 123, 128, 130, 131, 131, 133, 133, 130, 126, 124, 126, 125, 123, 123, 128, 132, 132, 132, 129, 126, 124, 123, 124, 123, 124, 127, 129, 129, 127, 131, 135, 133, 130, 131, 130, 126, 123, 119, 119, 124, 128, 132, 133, 134, 136, 132, 129, 125, 122, 121, 120, 123, 124, 126, 127, 130, 136, 131, 129, 131, 128, 127, 127, 127, 126, 129, 130, 127, 129, 126, 124, 126, 126, 126, 124, 125, 125, 125, 128, 130, 132, 134, 136, 134, 126, 121, 117, 119, 124, 124, 127, 134, 137, 136, 132, 131, 128, 123, 121, 121, 122, 126, 129, 132, 134, 134, 132, 129, 128, 125, 124, 120, 117, 120, 123, 128, 128, 125, 134, 140, 134, 126, 123, 125, 126, 127, 126, 130, 136, 133, 127, 125, 127, 126, 122, 123, 125, 128, 127, 127, 131, 131, 129, 126, 125, 126, 126, 124, 125, 130, 131, 131, 133, 133, 129, 126, 126, 123, 120, 122, 124, 128, 130, 130, 131, 129, 129, 129, 129, 129, 127, 126, 123, 124, 125, 128, 130, 126, 129, 130, 127, 129, 126, 126, 129, 130, 132, 132, 133, 129, 126, 125, 119, 120, 123, 126, 129, 129, 129, 129, 130, 128, 125, 128, 128, 127, 124, 126, 132, 131, 130, 130, 130, 130, 127, 126, 124, 122, 125, 127, 126, 127, 125, 123, 127, 127, 123, 130, 141, 137, 133, 131, 127, 128, 124, 118, 121, 122, 123, 126, 129, 129, 133, 136, 132, 131, 130, 123, 121, 121, 121, 125, 128, 126, 130, 136, 134, 131, 128, 126, 127, 125, 123, 125, 129, 130, 132, 131, 128, 130, 130, 126, 125, 121, 118, 122, 124, 125, 131, 134, 135, 134, 130, 126, 123, 122, 121, 124, 130, 131, 132, 133, 132, 131, 129, 124, 123, 124, 123, 123, 122, 124, 128, 131, 132, 131, 132, 130, 127, 124, 123, 126, 128, 129, 130, 130, 131, 130, 127, 126, 125, 125, 126, 127, 125, 125, 129, 132, 131, 130, 130, 127, 123, 122, 123, 126, 124, 122, 126, 130, 135, 134, 131, 131, 130, 129, 126, 125, 125, 125, 126, 124, 127, 130, 129, 130, 134, 133, 130, 128, 124, 123, 124, 123, 122, 122, 125, 128, 127, 132, 135, 133, 129, 125, 124, 125, 128, 130, 131, 131, 129, 125, 123, 123, 122, 127, 129, 129, 131, 129, 132, 132, 129, 127, 124, 123, 121, 123, 126, 128, 132, 132, 133, 132, 127, 126, 122, 122, 126, 128, 130, 127, 128, 130, 130, 128, 124, 124, 123, 124, 126, 127, 132, 132, 133, 131, 130, 129, 125, 124, 122, 125, 130, 128, 129, 130, 130, 128, 126, 126, 124, 125, 127, 125, 127, 129, 129, 131, 134, 131, 128, 127, 124, 124, 126, 129, 126, 121, 125, 126, 127, 131, 129, 129, 129, 130, 128, 126, 128, 127, 127, 128, 126, 124, 127, 130, 128, 128, 129, 129, 130, 129, 126, 126, 126, 125, 126, 126, 125, 125, 128, 130, 131, 131, 133, 132, 131, 128, 124, 124, 124, 123, 126, 129, 127, 130, 130, 128, 130, 126, 123, 124, 122, 118, 121, 136, 138, 135, 135, 131, 129, 125, 117, 119, 128, 130, 126, 128, 132, 133, 133, 127, 125, 126, 122, 118, 122, 127, 130, 136, 135, 135, 135, 127, 123, 119, 116, 122, 127, 127, 127, 132, 131, 129, 134, 131, 127, 126, 124, 126, 132, 131, 128, 132, 131, 128, 129, 124, 119, 119, 122, 126, 128, 130, 131, 136, 133, 126, 126, 123, 122, 124, 125, 128, 130, 134, 132, 129, 129, 128, 125, 122, 123, 127, 129, 127, 127, 129, 131, 130, 126, 125, 125, 128, 128, 128, 131, 131, 129, 129, 126, 127, 127, 126, 125, 120, 122, 127, 130, 133, 134, 134, 132, 129, 126, 124, 125, 123, 124, 126, 125, 128, 128, 128, 130, 130, 130, 126, 123, 124, 122, 123, 128, 129, 132, 135, 134, 132, 132, 129, 125, 123, 122, 123, 124, 125, 125, 127, 130, 128, 129, 131, 130, 130, 130, 128, 126, 124, 126, 127, 125, 126, 128, 128, 129, 129, 129, 131, 129, 125, 126, 127, 126, 129, 130, 129, 131, 131, 126, 124, 119, 119, 123, 125, 129, 135, 138, 134, 131, 130, 126, 123, 119, 117, 123, 125, 126, 129, 134, 139, 137, 133, 131, 128, 125, 120, 120, 121, 123, 128, 129, 132, 133, 131, 131, 127, 124, 123, 123, 124, 126, 130, 130, 132, 132, 126, 128, 130, 128, 129, 128, 125, 127, 129, 127, 128, 130, 129, 127, 124, 123, 125, 124, 124, 126, 126, 131, 133, 129, 129, 130, 127, 125, 123, 124, 129, 131, 128, 129, 133, 130, 127, 126, 126, 127, 126, 123, 126, 132, 131, 128, 128, 127, 127, 126, 125, 126, 127, 128, 127, 128, 129, 128, 127, 128, 129, 128, 129, 127, 127, 128, 125, 127, 128, 124, 127, 130, 132, 129, 127, 124, 122, 126, 123, 124, 132, 134, 134, 133, 126, 123, 125, 127, 128, 127, 125, 127, 130, 129, 126, 128, 131, 126, 124, 126, 127, 128, 127, 129, 131, 133, 131, 126, 128, 126, 123, 123, 125, 129, 126, 125, 128, 131, 130, 122, 123, 130, 131, 127, 125, 129, 133, 132, 128, 125, 126, 126, 127, 127, 126, 129, 128, 128, 131, 130, 128, 127, 125, 124, 126, 127, 125, 125, 128, 130, 132, 130, 128, 129, 128, 125, 125, 125, 127, 126, 122, 130, 136, 131, 129, 127, 127, 125, 121, 119, 123, 129, 128, 131, 134, 133, 134, 131, 126, 125, 123, 123, 126, 128, 128, 130, 130, 127, 125, 126, 127, 126, 127, 127, 128, 130, 129, 130, 129, 127, 125, 123, 126, 126, 125, 130, 131, 132, 132, 130, 128, 127, 125, 123, 122, 125, 125, 125, 127, 130, 131, 131, 131, 128, 126, 127, 127, 125, 124, 125, 127, 127, 128, 129, 129, 130, 127, 125, 127, 127, 127, 127, 130, 130, 129, 129, 127, 126, 125, 123, 124, 125, 130, 135, 132, 127, 126, 128, 126, 125, 125, 125, 128, 130, 129, 131, 133, 132, 129, 125, 121, 120, 122, 123, 129, 133, 132, 132, 130, 131, 129, 128, 124, 121, 123, 122, 124, 129, 129, 136, 137, 132, 129, 126, 124, 122, 125, 127, 124, 126, 129, 130, 133, 133, 128, 128, 124, 119, 119, 121, 128, 132, 133, 134, 133, 134, 129, 124, 124, 119, 118, 119, 121, 130, 137, 136, 135, 138, 134, 124, 122, 119, 121, 124, 123, 125, 131, 130, 130, 133, 130, 130, 128, 122, 124, 123, 123, 127, 130, 131, 133, 139, 134, 129, 128, 124, 124, 122, 121, 125, 129, 130, 130, 130, 128, 127, 124, 123, 128, 125, 125, 128, 131, 134, 135, 134, 130, 128, 125, 121, 122, 122, 123, 129, 131, 130, 131, 132, 131, 127, 124, 124, 123, 121, 123, 126, 130, 130, 132, 135, 133, 131, 127, 126, 128, 125, 123, 124, 130, 131, 130, 132, 129, 126, 126, 123, 121, 122, 126, 129, 131, 133, 132, 130, 130, 126, 122, 123, 123, 125, 125, 123, 127, 128, 128, 130, 134, 134, 134, 135, 128, 127, 125, 123, 127, 128, 128, 126, 125, 124, 123, 127, 126, 125, 128, 129, 130, 130, 131, 130, 129, 131, 128, 125, 124, 124, 124, 128, 129, 129, 131, 130, 130, 130, 126, 125, 122, 123, 126, 128, 129, 129, 131, 130, 129, 130, 128, 126, 124, 125, 127, 124, 124, 127, 127, 130, 131, 129, 133, 134, 131, 128, 128, 126, 123, 123, 122, 123, 128, 128, 129, 131, 129, 130, 131, 129, 128, 128, 126, 122, 125, 125, 126, 129, 128, 131, 132, 129, 125, 125, 125, 124, 127, 128, 130, 134, 130, 131, 131, 125, 124, 126, 125, 123, 126, 127, 127, 128, 127, 128, 130, 129, 126, 126, 127, 123, 128, 130, 127, 129, 128, 130, 131, 130, 126, 125, 128, 124, 127, 128, 125, 129, 130, 129, 125, 123, 120, 122, 128, 127, 130, 133, 134, 132, 130, 129, 128, 129, 122, 121, 128, 124, 127, 127, 128, 132, 130, 131, 125, 127, 126, 122, 128, 126, 127, 128, 130, 131, 127, 128, 123, 123, 127, 126, 128, 127, 128, 127, 126, 127, 124, 127, 128, 130, 127, 127, 135, 134, 135, 133, 131, 132, 128, 126, 121, 122, 123, 125, 129, 128, 131, 131, 130, 132, 129, 126, 124, 126, 126, 128, 130, 128, 126, 126, 128, 128, 127, 126, 124, 126, 124, 123, 123, 123, 127, 128, 128, 128, 129, 127, 127, 130, 126, 126, 125, 125, 129, 128, 129, 127, 129, 128, 126, 127, 125, 128, 130, 132, 130, 130, 136, 133, 133, 128, 122, 124, 122, 123, 124, 127, 129, 129, 132, 128, 128, 124, 120, 127, 127, 127, 129, 131, 132, 133, 134, 127, 125, 124, 122, 124, 122, 123, 125, 128, 131, 132, 133, 131, 131, 128, 125, 128, 127, 126, 127, 129, 132, 132, 131, 128, 128, 127, 126, 123, 123, 126, 129, 129, 131, 131, 129, 130, 128, 122, 123, 123, 120, 122, 124, 126, 132, 135, 132, 131, 131, 128, 126, 126, 124, 124, 124, 121, 127, 129, 125, 131, 135, 135, 135, 133, 131, 129, 128, 121, 121, 124, 120, 124, 126, 127, 130, 129, 130, 128, 128, 130, 130, 131, 127, 126, 127, 126, 125, 124, 128, 131, 133, 132, 130, 128, 124, 123, 122, 122, 124, 126, 129, 130, 132, 130, 131, 134, 130, 127, 126, 126, 127, 126, 125, 127, 128, 124, 125, 129, 128, 128, 129, 130, 129, 122, 119, 125, 128, 127, 130, 129, 131, 134, 127, 128, 132, 127, 125, 124, 124, 124, 128, 128, 131, 136, 132, 132, 130, 127, 129, 128, 127, 127, 126, 125, 125, 128, 127, 127, 128, 126, 125, 125, 126, 125, 127, 128, 129, 132, 130, 126, 126, 125, 127, 129, 125, 125, 128, 129, 127, 126, 124, 126, 130, 128, 127, 130, 131, 132, 132, 133, 133, 130, 128, 124, 124, 125, 124, 127, 129, 130, 132, 130, 125, 125, 126, 121, 121, 123, 123, 127, 130, 131, 130, 131, 130, 127, 127, 125, 125, 122, 123, 126, 127, 131, 131, 132, 132, 130, 131, 126, 126, 126, 124, 124, 124, 126, 126, 129, 132, 130, 130, 129, 129, 125, 124, 130, 132, 132, 134, 133, 133, 130, 127, 123, 124, 126, 124, 123, 125, 127, 126, 126, 128, 130, 125, 121, 122, 125, 125, 125, 128, 132, 133, 131, 125, 127, 130, 129, 129, 129, 128, 125, 123, 125, 127, 127, 128, 133, 135, 132, 130, 130, 128, 125, 124, 121, 122, 126, 129, 131, 134, 132, 128, 126, 125, 123, 121, 117, 120, 124, 128, 134, 136, 136, 136, 132, 124, 120, 119, 117, 121, 126, 127, 131, 133, 133, 135, 133, 130, 126, 125, 124, 121, 126, 131, 135, 140, 140, 138, 133, 132, 127, 119, 118, 114, 117, 123, 121, 126, 129, 131, 130, 128, 128, 123, 121, 120, 120, 121, 123, 131, 132, 130, 133, 130, 128, 126, 126, 126, 128, 129, 130, 136, 138, 136, 135, 135, 130, 124, 123, 123, 125, 127, 126, 130, 132, 130, 128, 130, 126, 122, 123, 119, 117, 121, 127, 130, 133, 135, 131, 128, 120, 115, 119, 119, 125, 127, 129, 135, 136, 138, 135, 134, 131, 123, 122, 119, 121, 125, 129, 138, 138, 136, 135, 129, 126, 121, 118, 119, 122, 127, 128, 131, 138, 138, 136, 133, 127, 123, 120, 118, 118, 122, 132, 132, 132, 136, 134, 134, 129, 123, 121, 119, 121, 121, 124, 128, 132, 136, 133, 133, 131, 125, 125, 121, 120, 127, 126, 125, 129, 132, 131, 131, 130, 126, 128, 123, 118, 122, 123, 123, 127, 128, 129, 130, 129, 127, 126, 125, 122, 120, 125, 130, 133, 135, 135, 136, 135, 132, 127, 126, 124, 121, 127, 128, 125, 129, 131, 134, 132, 133, 133, 127, 129, 127, 124, 125, 126, 128, 131, 134, 131, 127, 130, 127, 127, 126, 124, 128, 127, 126, 128, 126, 126, 128, 127, 126, 124, 122, 121, 120, 124, 128, 130, 130, 129, 131, 129, 125, 126, 124, 126, 125, 126, 127, 127, 132, 131, 132, 134, 129, 129, 125, 121, 119, 121, 126, 125, 128, 131, 132, 133, 129, 127, 126, 124, 121, 122, 127, 129, 131, 133, 134, 131, 127, 127, 126, 125, 124, 125, 127, 129, 129, 130, 132, 129, 127, 127, 125, 127, 127, 128, 129, 131, 133, 131, 130, 128, 126, 125, 122, 122, 122, 126, 128, 130, 131, 130, 133, 130, 122, 123, 124, 123, 124, 125, 128, 133, 134, 130, 129, 130, 126, 124, 123, 122, 125, 128, 130, 130, 132, 133, 131, 130, 128, 124, 123, 120, 123, 128, 124, 123, 131, 134, 134, 133, 128, 127, 126, 120, 121, 125, 127, 129, 131, 132, 132, 131, 129, 128, 126, 120, 121, 123, 124, 126, 132, 135, 132, 133, 131, 127, 125, 123, 123, 125, 127, 128, 129, 130, 132, 131, 128, 126, 125, 123, 121, 122, 125, 127, 130, 133, 132, 130, 130, 126, 126, 127, 123, 125, 130, 130, 131, 132, 129, 130, 132, 125, 123, 126, 122, 125, 127, 127, 130, 131, 131, 128, 126, 124, 124, 127, 123, 123, 126, 128, 132, 133, 133, 135, 134, 128, 122, 122, 120, 122, 127, 129, 132, 134, 129, 125, 126, 124, 122, 125, 127, 128, 129, 130, 131, 134, 133, 129, 126, 124, 122, 123, 125, 126, 130, 133, 134, 135, 132, 128, 127, 123, 118, 117, 121, 122, 126, 132, 134, 136, 135, 132, 129, 127, 124, 118, 119, 121, 124, 129, 130, 133, 134, 133, 130, 128, 127, 124, 126, 124, 123, 125, 123, 128, 134, 136, 131, 128, 127, 123, 122, 121, 123, 128, 132, 133, 130, 131, 132, 129, 127, 128, 128, 125, 125, 126, 126, 127, 125, 127, 130, 131, 130, 129, 126, 123, 125, 126, 126, 129, 129, 130, 131, 130, 128, 127, 126, 123, 124, 124, 123, 124, 126, 130, 132, 133, 131, 129, 127, 126, 124, 120, 120, 125, 130, 132, 133, 132, 133, 134, 128, 125, 126, 124, 124, 125, 124, 126, 130, 129, 126, 128, 129, 127, 125, 122, 126, 129, 129, 132, 133, 134, 133, 133, 129, 125, 123, 121, 123, 124, 124, 123, 127, 134, 130, 128, 129, 128, 127, 124, 124, 125, 128, 129, 127, 129, 128, 127, 125, 124, 128, 128, 127, 130, 130, 130, 130, 129, 125, 126, 127, 125, 127, 128, 128, 129, 130, 131, 130, 131, 128, 127, 128, 126, 125, 126, 126, 127, 129, 130, 129, 128, 127, 126, 123, 120, 124, 125, 129, 133, 130, 128, 129, 128, 124, 123, 123, 123, 127, 129, 132, 134, 135, 136, 131, 127, 127, 124, 124, 123, 121, 125, 128, 126, 129, 131, 131, 133, 127, 123, 127, 130, 128, 128, 132, 129, 130, 129, 125, 128, 127, 126, 127, 125, 126, 127, 128, 125, 124, 128, 125, 125, 127, 127, 131, 131, 131, 129, 129, 127, 122, 124, 123, 123, 127, 128, 131, 134, 133, 131, 130, 128, 123, 125, 118, 114, 126, 132, 134, 138, 136, 134, 134, 128, 119, 121, 125, 124, 128, 126, 126, 133, 137, 136, 133, 130, 127, 126, 124, 121, 123, 128, 130, 127, 127, 130, 128, 130, 128, 124, 126, 126, 127, 126, 128, 128, 128, 131, 127, 125, 125, 124, 125, 125, 127, 126, 126, 131, 131, 129, 125, 124, 125, 125, 127, 128, 128, 129, 127, 127, 126, 126, 125, 127, 131, 129, 127, 130, 130, 131, 132, 131, 130, 127, 128, 126, 125, 128, 127, 126, 125, 126, 128, 127, 128, 126, 125, 125, 125, 126, 127, 131, 134, 133, 130, 126, 128, 129, 129, 131, 131, 126, 124, 125, 123, 124, 127, 126, 127, 129, 129, 130, 131, 132, 131, 131, 128, 123, 121, 122, 124, 125, 126, 129, 131, 129, 128, 128, 126, 124, 122, 123, 127, 128, 128, 129, 131, 133, 132, 128, 128, 128, 127, 127, 127, 127, 129, 132, 132, 132, 130, 127, 127, 125, 123, 127, 127, 129, 131, 132, 131, 126, 124, 126, 122, 118, 121, 124, 124, 130, 134, 134, 137, 135, 130, 125, 122, 120, 121, 124, 124, 128, 130, 130, 129, 126, 128, 128, 127, 127, 127, 128, 126, 129, 131, 129, 131, 132, 131, 129, 126, 125, 127, 128, 125, 125, 128, 128, 127, 126, 125, 126, 128, 127, 126, 127, 125, 126, 127, 127, 127, 129, 131, 130, 129, 129, 130, 128, 126, 128, 127, 125, 126, 127, 129, 131, 132, 132, 129, 123, 120, 127, 126, 123, 126, 127, 128, 127, 124, 123, 127, 131, 130, 130, 129, 127, 129, 129, 126, 126, 126, 124, 126, 127, 125, 126, 126, 127, 130, 129, 128, 130, 131, 129, 130, 128, 125, 130, 130, 128, 130, 130, 131, 131, 128, 125, 127, 127, 124, 123, 123, 126, 128, 125, 125, 126, 128, 131, 128, 126, 128, 130, 130, 127, 127, 126, 126, 129, 125, 124, 128, 131, 134, 131, 128, 126, 127, 124, 119, 122, 124, 127, 129, 128, 128, 128, 129, 125, 122, 127, 126, 126, 128, 129, 130, 134, 136, 133, 133, 127, 123, 124, 121, 120, 124, 128, 132, 135, 134, 130, 130, 126, 123, 124, 121, 122, 126, 131, 132, 130, 133, 136, 139, 132, 125, 125, 122, 121, 121, 122, 125, 128, 129, 129, 130, 130, 128, 129, 126, 121, 120, 122, 126, 126, 129, 133, 133, 133, 132, 130, 130, 128, 126, 123, 121, 123, 125, 127, 127, 128, 132, 131, 129, 124, 122, 122, 120, 122, 126, 130, 135, 134, 133, 132, 130, 128, 128, 127, 124, 126, 126, 123, 123, 128, 132, 133, 130, 128, 128, 127, 123, 120, 121, 123, 126, 127, 128, 131, 133, 131, 131, 129, 127, 125, 125, 127, 127, 129, 129, 129, 129, 128, 128, 124, 122, 124, 127, 128, 129, 130, 131, 133, 134, 132, 129, 125, 124, 123, 123, 123, 125, 129, 129, 131, 132, 131, 130, 125, 123, 121, 121, 123, 124, 127, 129, 131, 131, 131, 127, 121, 124, 127, 126, 127, 130, 134, 136, 135, 129, 127, 129, 125, 123, 123, 123, 126, 127, 130, 129, 131, 131, 125, 125, 128, 127, 125, 125, 129, 132, 131, 129, 130, 133, 130, 127, 126, 124, 124, 124, 122, 125, 130, 131, 132, 134, 132, 131, 128, 124, 121, 121, 121, 121, 125, 126, 128, 134, 134, 134, 133, 129, 127, 127, 125, 123, 125, 126, 129, 132, 129, 125, 125, 123, 119, 121, 124, 123, 128, 128, 127, 134, 131, 129, 130, 130, 132, 130, 128, 126, 127, 131, 130, 130, 129, 130, 130, 123, 119, 124, 130, 131, 132, 132, 130, 132, 128, 122, 123, 125, 123, 123, 126, 126, 128, 133, 131, 130, 127, 121, 120, 120, 121, 123, 124, 128, 132, 134, 134, 130, 130, 129, 126, 125, 124, 127, 130, 130, 131, 131, 131, 130, 130, 129, 127, 129, 128, 127, 127, 125, 124, 126, 129, 127, 128, 130, 129, 127, 125, 124, 126, 127, 127, 128, 130, 129, 128, 127, 125, 127, 128, 126, 125, 128, 125, 125, 130, 128, 127, 129, 127, 126, 126, 126, 127, 130, 131, 130, 130, 131, 130, 128, 126, 124, 124, 126, 126, 128, 130, 132, 132, 131, 131, 128, 123, 125, 127, 126, 125, 127, 126, 124, 128, 129, 127, 126, 127, 128, 130, 128, 127, 129, 129, 128, 126, 127, 131, 129, 128, 125, 120, 121, 124, 125, 127, 131, 135, 134, 134, 132, 127, 126, 125, 123, 123, 123, 124, 127, 132, 134, 133, 131, 130, 130, 124, 118, 116, 117, 120, 124, 126, 127, 130, 134, 134, 131, 130, 131, 129, 126, 125, 125, 127, 129, 130, 132, 131, 131, 128, 125, 125, 126, 124, 126, 129, 129, 130, 128, 127, 129, 128, 127, 129, 128, 125, 124, 126, 124, 121, 124, 127, 129, 131, 133, 132, 132, 131, 125, 126, 125, 124, 126, 126, 125, 126, 129, 131, 132, 131, 127, 124, 125, 126, 124, 125, 129, 131, 132, 130, 128, 127, 126, 126, 127, 125, 122, 122, 124, 130, 134, 129, 131, 135, 131, 127, 124, 122, 125, 127, 126, 127, 129, 128, 129, 131, 126, 125, 128, 126, 123, 125, 130, 131, 133, 135, 133, 130, 128, 126, 124, 124, 125, 127, 127, 128, 129, 127, 127, 125, 125, 127, 125, 125, 127, 128, 129, 128, 127, 126, 125, 122, 121, 126, 128, 129, 128, 126, 128, 128, 124, 126, 129, 128, 132, 135, 130, 131, 132, 128, 133, 133, 129, 131, 129, 127, 125, 123, 121, 122, 124, 123, 125, 127, 126, 128, 127, 126, 127, 128, 128, 125, 127, 127, 126, 126, 127, 129, 129, 128, 129, 129, 130, 131, 132, 129, 126, 127, 130, 130, 125, 127, 131, 132, 130, 125, 125, 128, 126, 123, 124, 123, 125, 129, 126, 123, 127, 128, 127, 127, 126, 125, 127, 127, 127, 129, 131, 131, 129, 129, 128, 126, 131, 133, 132, 130, 130, 133, 133, 131, 128, 127, 128, 126, 124, 123, 122, 122, 124, 125, 126, 126, 130, 133, 129, 126, 126, 126, 127, 127, 127, 126, 129, 130, 127, 130, 129, 127, 129, 127, 126, 124, 124, 125, 125, 126, 126, 126, 127, 126, 125, 126, 127, 128, 130, 129, 130, 131, 131, 128, 122, 127, 131, 127, 127, 127, 128, 130, 127, 124, 125, 129, 127, 125, 125, 126, 128, 129, 129, 129, 128, 130, 133, 131, 126, 124, 123, 122, 122, 124, 126, 128, 133, 136, 132, 128, 125, 124, 125, 125, 124, 127, 129, 129, 129, 126, 124, 124, 126, 125, 125, 127, 127, 127, 129, 129, 132, 133, 130, 127, 127, 126, 126, 124, 122, 127, 129, 131, 132, 130, 128, 128, 127, 125, 128, 128, 124, 126, 129, 129, 130, 129, 130, 130, 130, 126, 124, 127, 125, 127, 130, 129, 127, 127, 129, 129, 127, 126, 124, 126, 127, 125, 125, 125, 127, 131, 129, 126, 126, 126, 126, 124, 121, 119, 121, 126, 130, 132, 135, 138, 137, 131, 129, 128, 125, 123, 125, 127, 127, 128, 128, 132, 135, 132, 129, 124, 122, 123, 123, 123, 127, 131, 133, 135, 133, 127, 124, 122, 122, 123, 125, 125, 124, 125, 128, 131, 131, 131, 128, 127, 127, 124, 123, 125, 128, 131, 131, 133, 132, 131, 129, 126, 128, 124, 122, 127, 128, 132, 134, 134, 132, 129, 127, 122, 120, 118, 120, 124, 126, 128, 130, 133, 129, 127, 130, 130, 128, 126, 127, 129, 130, 128, 127, 131, 130, 127, 126, 123, 123, 122, 124, 128, 129, 134, 136, 136, 134, 133, 130, 125, 123, 121, 121, 121, 124, 127, 129, 131, 130, 130, 130, 128, 124, 122, 124, 126, 127, 129, 131, 132, 132, 131, 129, 128, 126, 126, 123, 120, 125, 128, 131, 132, 131, 133, 134, 133, 125, 123, 129, 128, 126, 127, 128, 130, 132, 130, 124, 123, 121, 122, 124, 124, 125, 124, 130, 135, 132, 130, 130, 128, 122, 123, 123, 122, 127, 130, 131, 134, 136, 133, 132, 132, 127, 127, 126, 123, 122, 121, 124, 126, 128, 128, 129, 130, 128, 127, 126, 126, 129, 131, 128, 127, 129, 127, 126, 124, 123, 125, 125, 128, 128, 127, 127, 129, 130, 128, 128, 127, 131, 130, 123, 127, 126, 125, 128, 127, 127, 127, 128, 126, 126, 126, 125, 126, 126, 126, 129, 131, 131, 132, 133, 130, 131, 129, 127, 127, 124, 126, 131, 131, 130, 128, 127, 126, 126, 124, 122, 121, 123, 127, 132, 133, 134, 137, 134, 128, 125, 125, 124, 120, 121, 121, 123, 126, 127, 131, 131, 132, 130, 126, 126, 120, 123, 127, 128, 132, 132, 135, 135, 131, 128, 126, 125, 123, 126, 126, 124, 128, 129, 131, 130, 128, 125, 125, 125, 122, 125, 129, 131, 133, 133, 132, 132, 131, 128, 125, 123, 123, 125, 127, 128, 130, 131, 130, 129, 127, 125, 126, 125, 125, 126, 127, 127, 128, 129, 129, 128, 128, 128, 127, 123, 122, 122, 127, 128, 128, 129, 127, 129, 128, 127, 127, 127, 131, 129, 129, 128, 126, 131, 130, 125, 125, 130, 131, 128, 128, 127, 130, 130, 126, 125, 127, 128, 126, 127, 126, 125, 129, 128, 126, 127, 126, 127, 128, 129, 129, 129, 129, 128, 128, 128, 127, 125, 125, 123, 122, 126, 130, 130, 126, 130, 133, 128, 128, 125, 125, 127, 127, 129, 130, 130, 130, 130, 131, 127, 125, 126, 123, 119, 120, 125, 127, 128, 130, 130, 132, 132, 128, 128, 127, 126, 125, 125, 129, 128, 128, 130, 127, 130, 128, 126, 130, 130, 128, 126, 124, 126, 126, 127, 126, 124, 127, 130, 130, 131, 130, 128, 129, 128, 125, 124, 126, 127, 126, 131, 131, 128, 129, 127, 127, 127, 125, 126, 128, 128, 125, 128, 130, 130, 130, 127, 126, 125, 124, 121, 124, 128, 129, 131, 131, 131, 131, 130, 126, 125, 126, 127, 131, 132, 129, 129, 129, 128, 126, 124, 123, 122, 123, 123, 123, 125, 129, 133, 133, 132, 130, 127, 125, 123, 123, 125, 127, 127, 130, 133, 133, 132, 131, 129, 128, 125, 123, 125, 128, 129, 130, 131, 131, 130, 130, 127, 123, 124, 125, 124, 123, 126, 129, 128, 129, 127, 124, 126, 126, 125, 126, 127, 128, 129, 129, 127, 125, 125, 124, 123, 122, 123, 128, 129, 127, 131, 134, 134, 133, 130, 127, 127, 127, 125, 126, 129, 130, 135, 137, 133, 131, 129, 126, 125, 123, 121, 124, 127, 127, 129, 132, 131, 130, 129, 124, 123, 124, 119, 120, 124, 125, 125, 126, 125, 126, 128, 127, 128, 132, 130, 127, 129, 129, 128, 128, 128, 129, 131, 132, 130, 128, 130, 130, 130, 129, 127, 128, 128, 126, 127, 129, 129, 130, 128, 124, 127, 129, 129, 129, 130, 130, 130, 129, 124, 124, 126, 122, 122, 125, 125, 123, 123, 123, 119, 119, 122, 125, 128, 127, 127, 129, 132, 132, 132, 132, 129, 127, 127, 127, 128, 130, 131, 129, 131, 131, 128, 128, 128, 130, 129, 128, 127, 125, 124, 123, 123, 122, 123, 127, 129, 128, 126, 127, 129, 129, 128, 128, 129, 128, 128, 129, 131, 130, 125, 129, 132, 130, 128, 124, 124, 124, 124, 124, 125, 127, 129, 131, 130, 128, 129, 128, 127, 126, 124, 125, 127, 128, 131, 131, 130, 126, 124, 125, 124, 123, 124, 126, 130, 131, 133, 134, 132, 132, 130, 128, 126, 123, 124, 125, 127, 129, 129, 130, 132, 132, 130, 128, 126, 125, 125, 125, 125, 125, 126, 128, 129, 130, 130, 129, 128, 127, 126, 125, 125, 125, 124, 124, 125, 126, 127, 128, 129, 129, 128, 127, 126, 126, 126, 123, 125, 129, 130, 131, 129, 127, 126, 127, 127, 129, 131, 129, 126, 124, 127, 129, 128, 130, 131, 131, 130, 129, 129, 128, 129, 128, 128, 131, 132, 130, 127, 125, 123, 123, 123, 123, 126, 127, 127, 130, 132, 131, 128, 127, 125, 122, 121, 121, 126, 128, 128, 131, 133, 133, 130, 126, 122, 121, 124, 124, 125, 128, 131, 134, 135, 133, 130, 130, 127, 124, 124, 124, 126, 130, 132, 132, 133, 133, 130, 126, 122, 121, 123, 125, 126, 127, 131, 132, 130, 129, 128, 128, 128, 124, 120, 118, 122, 128, 129, 131, 134, 136, 135, 131, 126, 119, 117, 121, 122, 125, 129, 132, 136, 137, 132, 128, 129, 127, 124, 123, 121, 121, 125, 127, 129, 132, 132, 129, 129, 128, 125, 124, 125, 125, 127, 130, 131, 131, 131, 129, 129, 127, 126, 125, 123, 125, 127, 129, 130, 130, 132, 131, 134, 131, 126, 124, 124, 127, 127, 126, 127, 127, 129, 130, 127, 125, 126, 127, 126, 128, 127, 126, 127, 127, 126, 125, 124, 124, 127, 128, 128, 128, 126, 128, 131, 129, 128, 129, 131, 131, 130, 127, 125, 126, 126, 125, 124, 125, 125, 130, 132, 130, 131, 134, 133, 130, 128, 124, 123, 126, 124, 124, 128, 129, 129, 131, 131, 130, 129, 127, 124, 125, 127, 126, 126, 127, 126, 129, 131, 129, 128, 127, 126, 127, 124, 120, 122, 125, 128, 129, 132, 135, 135, 134, 133, 126, 123, 125, 121, 122, 124, 126, 128, 129, 131, 131, 131, 132, 131, 129, 129, 127, 125, 125, 123, 122, 125, 126, 126, 127, 127, 129, 129, 128, 127, 127, 129, 130, 128, 129, 129, 128, 129, 128, 127, 129, 129, 127, 127, 127, 125, 125, 126, 125, 126, 126, 128, 130, 130, 130, 130, 132, 131, 127, 123, 124, 127, 127, 127, 127, 128, 131, 131, 129, 126, 126, 126, 126, 127, 124, 125, 128, 129, 129, 129, 130, 131, 128, 126, 126, 126, 128, 129, 127, 127, 129, 130, 131, 129, 127, 128, 128, 124, 123, 122, 123, 129, 132, 130, 130, 131, 131, 130, 128, 125, 124, 125, 125, 125, 128, 130, 130, 130, 131, 129, 127, 127, 125, 124, 127, 126, 125, 126, 126, 126, 126, 127, 128, 129, 131, 129, 129, 130, 129, 129, 130, 130, 127, 126, 127, 126, 127, 125, 124, 126, 128, 127, 127, 130, 129, 130, 128, 121, 122, 124, 124, 127, 129, 129, 131, 134, 133, 129, 128, 128, 127, 126, 124, 126, 127, 128, 128, 129, 130, 131, 132, 132, 129, 127, 124, 125, 129, 128, 125, 128, 132, 131, 129, 124, 119, 120, 117, 118, 125, 129, 132, 134, 134, 135, 136, 131, 125, 122, 121, 122, 122, 125, 131, 135, 137, 135, 132, 128, 123, 122, 119, 121, 123, 125, 130, 132, 134, 133, 133, 129, 125, 125, 121, 120, 121, 123, 130, 133, 135, 135, 135, 132, 126, 124, 121, 119, 120, 123, 126, 131, 135, 133, 133, 133, 130, 126, 122, 121, 124, 125, 125, 127, 129, 129, 131, 129, 127, 126, 125, 126, 126, 127, 128, 130, 131, 129, 127, 126, 124, 123, 125, 126, 125, 128, 128, 128, 134, 134, 132, 132, 131, 131, 129, 126, 123, 118, 122, 125, 122, 125, 130, 132, 135, 135, 128, 128, 132, 127, 123, 121, 121, 125, 128, 128, 128, 131, 132, 131, 131, 127, 124, 124, 125, 123, 123, 126, 128, 130, 131, 131, 132, 131, 129, 126, 124, 124, 125, 125, 125, 129, 131, 131, 131, 128, 127, 128, 127, 126, 124, 127, 128, 130, 131, 130, 127, 126, 128, 128, 127, 126, 125, 129, 130, 128, 128, 129, 128, 128, 128, 126, 125, 123, 123, 122, 120, 126, 129, 130, 134, 134, 133, 133, 131, 126, 122, 122, 123, 125, 126, 128, 129, 130, 131, 129, 127, 129, 129, 127, 125, 124, 126, 127, 128, 130, 130, 131, 130, 128, 127, 125, 124, 124, 125, 128, 128, 130, 130, 130, 130, 127, 126, 124, 123, 124, 124, 125, 127, 129, 133, 133, 131, 128, 128, 128, 127, 126, 125, 125, 127, 127, 129, 128, 127, 128, 127, 126, 125, 124, 126, 127, 130, 130, 131, 134, 132, 129, 127, 126, 123, 122, 122, 122, 125, 129, 131, 132, 132, 131, 128, 126, 125, 122, 124, 126, 128, 131, 134, 134, 133, 131, 130, 131, 125, 119, 117, 121, 125, 121, 123, 129, 134, 135, 133, 133, 131, 132, 129, 123, 122, 119, 121, 125, 127, 127, 128, 134, 134, 132, 131, 128, 128, 125, 125, 124, 124, 126, 127, 129, 130, 130, 130, 130, 131, 127, 127, 125, 126, 128, 129, 129, 129, 129, 130, 128, 125, 125, 126, 122, 123, 125, 126, 131, 133, 130, 129, 129, 126, 125, 126, 125, 125, 126, 126, 128, 130, 130, 130, 131, 130, 129, 130, 127, 125, 125, 125, 127, 128, 128, 128, 130, 128, 126, 128, 128, 127, 125, 123, 124, 125, 127, 128, 129, 131, 130, 129, 127, 126, 125, 126, 127, 126, 127, 130, 129, 130, 131, 130, 129, 130, 127, 125, 126, 126, 127, 130, 131, 130, 131, 131, 129, 127, 126, 125, 124, 124, 124, 124, 126, 128, 128, 129, 129, 127, 125, 126, 128, 129, 130, 130, 129, 129, 124, 120, 120, 122, 125, 126, 131, 132, 132, 133, 132, 130, 129, 128, 124, 123, 123, 120, 126, 131, 131, 134, 135, 132, 131, 129, 123, 121, 123, 124, 127, 133, 132, 132, 134, 134, 130, 126, 124, 122, 124, 122, 120, 127, 131, 133, 132, 129, 130, 129, 123, 121, 121, 121, 123, 127, 128, 131, 134, 133, 130, 128, 126, 121, 123, 125, 125, 130, 132, 133, 134, 133, 128, 127, 129, 125, 127, 128, 122, 125, 126, 125, 131, 133, 132, 132, 130, 124, 121, 121, 119, 122, 125, 127, 131, 134, 136, 135, 134, 129, 125, 125, 125, 124, 123, 126, 127, 127, 130, 131, 132, 132, 130, 127, 124, 123, 123, 124, 126, 128, 131, 131, 130, 128, 127, 125, 125, 124, 123, 125, 126, 126, 128, 131, 133, 132, 131, 128, 127, 127, 122, 120, 124, 127, 131, 133, 132, 132, 132, 129, 126, 125, 125, 124, 125, 126, 125, 126, 128, 129, 129, 129, 129, 129, 128, 125, 124, 126, 127, 129, 129, 128, 129, 127, 127, 126, 126, 126, 127, 129, 126, 126, 126, 126, 129, 131, 129, 129, 131, 130, 128, 130, 127, 125, 124, 120, 122, 126, 129, 129, 131, 133, 134, 132, 127, 125, 124, 122, 122, 123, 126, 127, 130, 133, 132, 132, 130, 126, 128, 126, 121, 121, 122, 124, 128, 130, 132, 132, 132, 131, 126, 124, 123, 124, 124, 124, 126, 129, 132, 132, 131, 131, 129, 128, 126, 123, 124, 126, 129, 128, 129, 130, 129, 132, 130, 127, 125, 122, 123, 123, 125, 128, 132, 134, 132, 131, 126, 126, 129, 125, 123, 122, 124, 127, 129, 131, 132, 132, 131, 130, 125, 122, 122, 124, 125, 125, 127, 130, 132, 134, 131, 127, 126, 123, 122, 125, 127, 127, 129, 128, 128, 129, 129, 127, 127, 127, 124, 125, 126, 125, 128, 129, 129, 131, 132, 130, 128, 128, 126, 123, 125, 125, 126, 128, 129, 130, 131, 133, 130, 128, 128, 126, 123, 125, 126, 126, 128, 128, 128, 129, 127, 127, 130, 130, 127, 126, 127, 126, 127, 127, 126, 127, 129, 127, 126, 127, 127, 126, 128, 128, 128, 128, 127, 126, 126, 124, 123, 125, 126, 127, 129, 130, 131, 131, 132, 130, 127, 127, 126, 126, 127, 127, 129, 128, 129, 129, 128, 130, 130, 128, 126, 127, 127, 128, 129, 127, 127, 128, 129, 128, 128, 128, 127, 128, 129, 127, 127, 129, 129, 128, 129, 127, 124, 123, 120, 122, 124, 125, 127, 130, 131, 131, 131, 130, 128, 128, 126, 124, 125, 126, 126, 128, 132, 133, 132, 130, 128, 127, 125, 125, 123, 124, 126, 126, 127, 128, 130, 131, 133, 133, 129, 127, 126, 123, 124, 124, 126, 129, 131, 131, 130, 129, 129, 127, 125, 124, 123, 123, 124, 126, 131, 135, 134, 133, 132, 128, 126, 124, 123, 125, 125, 124, 126, 130, 131, 130, 130, 129, 127, 127, 125, 124, 124, 126, 126, 128, 130, 128, 128, 127, 126, 127, 124, 126, 123, 122, 130, 135, 131, 129, 130, 128, 131, 133, 125, 124, 127, 127, 129, 129, 129, 126, 127, 128, 125, 125, 124, 127, 130, 130, 130, 128, 128, 127, 126, 126, 124, 127, 127, 127, 130, 129, 128, 129, 132, 132, 130, 129, 126, 127, 124, 123, 126, 127, 128, 130, 131, 129, 130, 129, 125, 125, 125, 124, 127, 129, 127, 127, 128, 126, 125, 127, 128, 127, 129, 129, 128, 129, 128, 130, 131, 128, 129, 129, 130, 130, 129, 128, 124, 121, 120, 123, 125, 127, 130, 132, 135, 134, 129, 127, 125, 123, 122, 123, 123, 125, 130, 134, 135, 132, 133, 132, 129, 126, 120, 119, 122, 124, 126, 127, 131, 133, 135, 133, 128, 127, 126, 123, 120, 121, 124, 129, 132, 132, 134, 134, 132, 129, 124, 120, 119, 122, 126, 128, 131, 133, 134, 134, 129, 121, 118, 123, 122, 123, 128, 127, 133, 139, 133, 128, 129, 126, 124, 125, 121, 121, 127, 128, 128, 129, 131, 131, 132, 132, 127, 127, 127, 127, 128, 126, 125, 126, 126, 125, 125, 126, 126, 127, 127, 128, 129, 130, 132, 131, 129, 129, 127, 126, 125, 125, 126, 129, 131, 130, 129, 129, 129, 126, 125, 124, 122, 124, 126, 126, 127, 129, 131, 133, 131, 127, 127, 126, 126, 126, 124, 125, 126, 126, 128, 130, 130, 129, 129, 128, 125, 126, 126, 127, 128, 128, 129, 131, 132, 130, 128, 127, 127, 127, 127, 126, 127, 128, 128, 127, 127, 127, 126, 126, 128, 128, 128, 128, 126, 126, 128, 127, 126, 127, 128, 128, 128, 126, 125, 126, 127, 130, 131, 130, 129, 131, 130, 125, 125, 126, 125, 126, 126, 127, 126, 128, 129, 128, 130, 127, 127, 127, 125, 126, 124, 127, 129, 129, 129, 128, 129, 128, 128, 128, 128, 128, 126, 128, 128, 126, 127, 129, 128, 127, 129, 128, 129, 129, 127, 128, 128, 127, 126, 126, 127, 127, 127, 127, 129, 130, 126, 126, 125, 127, 126, 125, 128, 129, 131, 131, 131, 129, 127, 124, 121, 124, 126, 129, 130, 131, 134, 134, 133, 130, 127, 125, 123, 120, 118, 120, 123, 127, 131, 131, 133, 133, 131, 128, 127, 124, 123, 126, 125, 127, 130, 130, 132, 136, 136, 130, 128, 127, 125, 126, 122, 120, 122, 124, 127, 128, 129, 128, 130, 131, 129, 129, 128, 130, 129, 127, 124, 124, 127, 126, 127, 128, 129, 129, 124, 123, 128, 129, 127, 128, 130, 127, 128, 129, 128, 129, 129, 128, 126, 126, 125, 124, 128, 128, 126, 125, 128, 131, 131, 130, 129, 128, 125, 123, 125, 125, 126, 129, 130, 130, 131, 129, 128, 128, 127, 125, 121, 120, 123, 126, 130, 131, 132, 132, 132, 130, 127, 127, 126, 125, 126, 127, 127, 128, 128, 131, 133, 131, 128, 128, 126, 123, 122, 121, 120, 122, 128, 130, 131, 133, 133, 131, 130, 130, 125, 125, 127, 126, 126, 128, 128, 128, 129, 129, 128, 128, 127, 125, 125, 127, 128, 130, 130, 127, 129, 128, 127, 127, 125, 124, 125, 126, 125, 126, 129, 128, 130, 131, 129, 129, 129, 128, 129, 129, 127, 127, 127, 127, 125, 121, 121, 123, 125, 126, 129, 131, 131, 134, 133, 128, 129, 126, 124, 124, 124, 122, 124, 130, 132, 133, 135, 131, 129, 127, 127, 126, 123, 122, 124, 126, 127, 130, 131, 131, 132, 132, 131, 128, 124, 119, 121, 124, 122, 123, 126, 130, 134, 133, 132, 132, 132, 129, 127, 125, 123, 123, 124, 125, 124, 123, 128, 131, 132, 130, 130, 130, 129, 129, 125, 125, 126, 125, 126, 127, 127, 127, 128, 129, 129, 128, 127, 127, 128, 129, 128, 130, 129, 126, 127, 125, 125, 128, 128, 129, 128, 130, 129, 129, 129, 127, 130, 129, 128, 127, 123, 125, 125, 127, 128, 130, 133, 127, 129, 128, 124, 125, 126, 127, 125, 128, 128, 127, 131, 131, 130, 128, 127, 127, 125, 126, 126, 127, 128, 128, 130, 128, 126, 125, 126, 124, 123, 126, 127, 128, 129, 130, 127, 128, 130, 130, 129, 125, 124, 122, 123, 128, 129, 133, 130, 134, 137, 130, 128, 127, 125, 124, 124, 124, 124, 130, 126, 125, 129, 130, 130, 129, 131, 129, 128, 129, 125, 126, 124, 123, 124, 126, 126, 126, 128, 128, 128, 129, 129, 130, 128, 129, 128, 128, 128, 127, 130, 129, 129, 128, 129, 131, 129, 128, 125, 123, 122, 122, 123, 124, 129, 129, 129, 130, 130, 131, 130, 129, 129, 127, 127, 125, 125, 126, 127, 127, 125, 125, 128, 130, 129, 129, 128, 128, 128, 127, 128, 127, 125, 126, 127, 128, 129, 129, 130, 130, 130, 130, 128, 127, 126, 125, 125, 125, 126, 127, 128, 129, 130, 131, 130, 129, 129, 129, 128, 126, 128, 127, 126, 124, 123, 125, 122, 123, 128, 132, 131, 128, 129, 128, 129, 125, 120, 125, 127, 129, 129, 131, 130, 130, 135, 131, 129, 129, 124, 124, 124, 123, 121, 124, 128, 127, 130, 130, 132, 132, 132, 129, 126, 126, 123, 126, 127, 126, 129, 129, 132, 130, 129, 129, 126, 128, 126, 125, 127, 129, 126, 122, 124, 125, 125, 128, 130, 128, 130, 134, 132, 132, 130, 125, 124, 125, 123, 119, 124, 126, 130, 135, 128, 128, 132, 132, 129, 125, 127, 121, 125, 129, 125, 129, 128, 128, 129, 129, 126, 121, 126, 124, 124, 127, 124, 127, 130, 131, 128, 128, 129, 127, 130, 130, 128, 130, 129, 130, 130, 131, 128, 127, 127, 125, 124, 122, 125, 127, 128, 128, 128, 129, 128, 131, 129, 127, 129, 127, 127, 127, 126, 126, 126, 129, 127, 128, 129, 127, 128, 126, 129, 130, 126, 124, 123, 125, 126, 128, 130, 129, 133, 132, 130, 131, 127, 125, 124, 122, 119, 118, 122, 126, 133, 134, 132, 134, 135, 133, 129, 125, 121, 120, 124, 123, 124, 127, 131, 134, 136, 133, 127, 126, 124, 123, 122, 122, 124, 127, 131, 133, 132, 131, 128, 129, 128, 127, 126, 126, 128, 130, 132, 128, 126, 127, 127, 128, 124, 123, 125, 129, 130, 129, 129, 128, 129, 128, 125, 124, 124, 125, 128, 130, 129, 128, 131, 132, 131, 129, 127, 124, 122, 124, 125, 127, 127, 128, 132, 133, 131, 128, 126, 124, 122, 123, 124, 127, 128, 132, 133, 130, 129, 127, 127, 127, 125, 125, 125, 129, 131, 132, 131, 128, 126, 123, 122, 121, 123, 126, 129, 133, 136, 135, 134, 133, 129, 125, 122, 119, 117, 120, 125, 127, 131, 134, 135, 135, 133, 129, 125, 122, 120, 120, 124, 126, 130, 132, 133, 136, 133, 130, 125, 123, 121, 119, 121, 123, 127, 130, 132, 135, 133, 130, 130, 128, 126, 125, 126, 125, 125, 127, 129, 129, 129, 129, 128, 129, 127, 126, 126, 126, 128, 128, 128, 128, 130, 129, 127, 128, 126, 127, 128, 125, 125, 124, 125, 126, 130, 131, 129, 132, 131, 130, 130, 128, 124, 119, 120, 121, 124, 125, 128, 133, 135, 136, 133, 130, 130, 125, 123, 120, 120, 122, 125, 129, 132, 134, 135, 133, 129, 126, 123, 119, 119, 123, 127, 132, 133, 133, 133, 132, 131, 128, 123, 121, 120, 122, 125, 128, 131, 134, 135, 134, 130, 126, 122, 119, 119, 121, 121, 124, 127, 131, 137, 137, 135, 133, 130, 128, 125, 123, 121, 121, 125, 127, 129, 130, 131, 131, 130, 129, 126, 125, 125, 124, 125, 128, 130, 129, 130, 131, 131, 131, 129, 125, 123, 124, 125, 126, 123, 124, 127, 131, 134, 131, 130, 129, 129, 130, 125, 124, 123, 123, 126, 128, 127, 124, 125, 129, 133, 132, 127, 128, 131, 132, 131, 126, 125, 125, 127, 128, 125, 124, 123, 128, 128, 126, 126, 127, 129, 131, 130, 127, 126, 128, 128, 128, 127, 128, 131, 131, 131, 129, 128, 127, 128, 128, 125, 124, 123, 124, 125, 126, 127, 128, 129, 130, 130, 129, 128, 128, 127, 127, 127, 127, 126, 128, 129, 129, 128, 127, 126, 126, 125, 125, 125, 129, 129, 130, 130, 130, 131, 128, 127, 125, 125, 128, 126, 127, 131, 132, 132, 129, 128, 126, 122, 122, 122, 122, 125, 127, 128, 132, 134, 133, 133, 131, 126, 124, 122, 120, 123, 124, 128, 131, 132, 134, 133, 130, 126, 124, 123, 121, 122, 123, 126, 129, 132, 134, 132, 130, 128, 126, 127, 126, 125, 127, 128, 130, 130, 127, 128, 129, 128, 126, 124, 124, 126, 129, 131, 131, 130, 129, 131, 129, 126, 124, 123, 124, 127, 129, 129, 128, 130, 131, 131, 126, 124, 123, 123, 125, 126, 126, 129, 132, 134, 133, 130, 127, 124, 123, 123, 121, 122, 126, 129, 133, 134, 132, 130, 130, 129, 125, 123, 122, 122, 126, 128, 129, 130, 132, 131, 131, 131, 128, 127, 125, 125, 127, 126, 128, 128, 130, 130, 129, 129, 126, 125, 126, 128, 128, 128, 128, 128, 129, 129, 129, 126, 124, 125, 125, 126, 126, 126, 129, 131, 131, 128, 127, 127, 126, 124, 124, 126, 124, 125, 129, 131, 132, 131, 132, 131, 130, 128, 125, 124, 123, 124, 125, 126, 128, 130, 132, 131, 130, 128, 127, 127, 126, 127, 126, 127, 129, 129, 130, 130, 130, 127, 125, 125, 123, 123, 123, 126, 127, 128, 131, 132, 131, 129, 127, 127, 125, 124, 123, 123, 125, 130, 132, 131, 131, 130, 129, 128, 126, 124, 124, 125, 126, 127, 129, 130, 131, 131, 130, 129, 129, 127, 124, 125, 126, 127, 129, 129, 130, 130, 129, 127, 126, 126, 126, 126, 125, 126, 127, 128, 129, 129, 129, 128, 128, 127, 127, 127, 127, 127, 128, 128, 129, 128, 127, 128, 128, 128, 126, 126, 127, 128, 128, 127, 127, 128, 127, 128, 128, 128, 127, 127, 128, 130, 130, 128, 128, 130, 131, 129, 127, 128, 127, 127, 127, 125, 126, 127, 127, 127, 127, 126, 127, 128, 126, 127, 128, 127, 129, 128, 128, 128, 129, 129, 128, 128, 127, 127, 127, 127, 128, 128, 128, 128, 127, 126, 126, 127, 126, 125, 126, 127, 127, 127, 128, 128, 128, 128, 126, 127, 127, 128, 128, 128, 129, 129, 129, 129, 128, 129, 129, 128, 128, 127, 127, 127, 126, 127, 127, 126, 128, 128, 128, 127, 128, 127, 126, 127, 126, 127, 126, 126, 127, 126, 127, 127, 127, 128, 127, 127, 126, 126, 127, 126, 127, 128, 128, 127, 128, 128, 129, 129, 128, 127, 128, 128, 128, 128, 128, 127, 128, 128, 129, 129, 129, 130, 129, 129, 128, 128, 127, 126, 127, 126, 127, 129, 128, 128, 128, 127, 126, 126, 127, 127, 127, 126, 127, 127, 128, 129, 128, 128, 128, 128, 128, 127, 127, 127, 126, 127, 127, 127, 127, 127, 127, 128, 127, 127, 126, 127, 128, 127, 128, 128, 128, 129, 128, 128, 129, 129, 129, 129, 128, 127, 127, 127, 128, 128, 127, 127, 127, 127, 127, 127, 127, 126, 127, 127, 127, 127, 128, 128, 128, 129, 130, 129, 129, 129, 130, 130, 128, 128, 128, 127, 127, 128, 127, 126, 127, 127, 127, 127, 127, 128, 128, 127, 126, 126, 126, 126, 125, 125, 125, 126, 126, 126, 126, 126, 126, 127, 128, 127, 127, 127, 127, 127, 128, 129, 129, 128, 128, 128, 128, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 128, 127, 127, 128, 128, 128, 128, 127, 128, 128, 128, 128, 127, 127, 127, 128, 128, 128, 128, 128, 127, 127, 127, 127, 127, 127, 127, 127, 128, 127, 127, 128, 128, 128, 128, 128, 128, 128, 127, 127, 127, 128, 127, 127, 127, 127, 127, 127, 127, 127, 127, 128, 128, 128, 127, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 128, 128, 128, 128, 127, 128, 128, 128, 128, 127, 127, 128, 128, 127, 127, 127, 127, 128, 127, 127, 127, 127, 127, 127, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 127, 128, 128, 128, 128, 128, 128, 128, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 128, 127, 127, 127, 127, 127, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 128, 128, 128, 128, 128, 128, 127, 127, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 128, 128, 128, 127, 128, 128, 128, 128, 127, 128, 128, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 128, 127, 128, 128, 128, 128, 128, 128, 128, 127, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 128, 128, 127, 127, 128, 128, 128, 128, 127, 128, 127, 127, 127, 127, 128, 128, 127, 128, 128, 127, 127, 127, 127, 127, 128, 127, 127, 127, 128, 128, 128, 127, 128, 128, 128, 127, 128, 127, 127, 127, 127, 127, 128, 127, 127, 128, 127, 127, 128, 128, 128, 128, 128, 127, 128, 128, 128, 127, 127, 128, 128, 128, 128, 127, 127, 128, 127, 128, 128, 127, 127, 127, 127, 127, 127, 128, 128, 128, 128, 127, 127, 127, 128, 128, 127, 128, 127, 127, 127, 127, 128, 127, 128, 127, 127, 127, 127, 127, 128, 127, 127, 127, 127, 127, 128, 128, 128, 127, 127, 127, 128, 127, 127, 127, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 127, 127, 128, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 128, 128, 127, 128, 127, 127, 128, 128, 127, 127, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 128, 128, 127, 128, 127, 127, 127, 127, 127, 128, 127, 127, 128, 127, 127, 127, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 127, 127, 127, 127, 127, 127, 127, 127, 128, 128, 127, 127, 128, 127, 127, 128, 127, 127, 127, 127, 127, 128, 128, 128, 128, 128, 128, 128, 128, 128, 
};


//Define for servo
Servo myservo;
int pos = 0;

//Function for servo movement
void servo(){
  for (pos = 60; pos <= 180; pos += 1) { // goes from 60 degrees to 180 degrees with increment of 1
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(10);                       // waits 10 ms for the servo to reach the position
  }
  for (pos = 180; pos >= 60; pos -= 1) { // goes from 180 degrees to 60 degrees with decrement of 1
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(10);                       // waits 10 ms for the servo to reach the position
  }
  for (pos = 60; pos <= 180; pos += 1) { // goes from 60 degrees to 180 degrees with increment of 1
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(10);                       // waits 10 ms for the servo to reach the position
  }
  for (pos = 180; pos >= 60; pos -= 1) { // goes from 180 degrees to 60 degrees with decrement of 1
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(10);                       // waits 10 ms for the servo to reach the position
  }
  for (pos = 60; pos <= 180; pos += 1) { // goes from 60 degrees to 180 degrees with increment of 1
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(10);                       // waits 10 ms for the servo to reach the position
  }
  for (pos = 180; pos >= 60; pos -= 1) { // goes from 180 degrees to 60 degrees with decrement of 1
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(10);                       // waits 10 ms for the servo to reach the position
  }
}

void setup() {
  //Wave in the beginning as a welcome gesture
  servo();

  // initialize the LCD ----------------------->
  lcd.begin();

  // Turn on the blacklight and print a message.
  lcd.backlight();
  lcd.print("SCAN YOUR KEYCARD");
  lcd.clear();
  SPI.begin();
  //RFID start
  mfrc522.PCD_Init();
  //Output the leds
  pinMode(LED_G, OUTPUT);
  pinMode(LED_R, OUTPUT);
  pinMode(LED_G2, OUTPUT);
  pinMode(LED_R2, OUTPUT);
  //Attach the servo to pin 6
  myservo.attach(6);
}

void loop() {
  // Clear the LCD and print "Scan your keycard" and clear it to initialise the process
  lcd.clear();
  lcd.print("SCAN YOUR KEYCARD");
  delay(1000);
  lcd.clear();

  // Looking for new cards, if not return nothing
  if (!mfrc522.PICC_IsNewCardPresent()) {
    return;
  }
  // Select one of the cards, if not return nothing
  if (!mfrc522.PICC_ReadCardSerial()) {
    return;
  }
  //Initialise variable content to take in the serial read by the RFID tag
  String content = "";
  byte letter;
  //Reading in the data and concatenate the serial to the content variable declared above
  for (byte i = 0; i < mfrc522.uid.size; i++) {
    content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));
    content.concat(String(mfrc522.uid.uidByte[i], HEX));
  }
  //Set the serial read in to uppercase to avoid complication with casing
  content.toUpperCase();

  //If the content serial read by the RFID matches the pre-recorded card UID
  if (content.substring(1) == "53 61 7B 19") {
    //LCD screen prints out the custom welcome message
    lcd.print("WELCOME BACK ZAYNA");
    //Both leds in the eyes turn green
    digitalWrite(LED_G, HIGH);
    digitalWrite(LED_G2, HIGH);
    delay(2000);
    //The wave movement in the arm using the servo
    servo();
    delay(2000);
    //Remove the welcome message
    lcd.clear();
    //Turn off the green in the RGB leds in the eyes
    digitalWrite(LED_G, LOW);
    digitalWrite(LED_G2, LOW);
  }
  //If RFID tag read serial different than the preset one
  else {
    //LCD screen prints out hostile and offensive message
    lcd.print("GO AWAY SOLE");
    //Guard monkey daunting red eyes turn off
    digitalWrite(LED_R, HIGH);
    digitalWrite(LED_R2, HIGH);
    //The intimidating barking sets off from the speaker
    playback(barking, sizeof(barking));
    delay(2000);
    //Remove message from the LCD screen
    lcd.clear();
    //Turn the leds back off
    digitalWrite(LED_R, LOW);
    digitalWrite(LED_R2, LOW);
  }
}

TESTING AND SHORTCOMINGS

We aimed to recycle as many components as possible. After managing to find an LCD, distance sensor, motion sensor, speaker, and servos, we trialled each component individually. None of the components could be used as they were either faulty or broken, other than a few servos. After buying the components we could not get working from our recycled parts, we tested them individually and found the speak was far too quiet, this was resolved by adding a transistor and changing the speaker library. However, the speaker and servo were unable to work at the same time due to their interfering serial libraries, this resulted in a processing error with each component cross obstructing one another. Changing the libraries used for the speaker along with the library files to pin 3 instead of pin 11, as it was used by the RFID module MOSI cleared the processing error.

When trialling the components using the 9V battery, we found it had too low a voltage to charge the sensors and actuators in the circuit.

We encountered problems due to the bear being inaccessible internally without being unstitched, as this meant we were unable to access the wires and components inside the bear after we attached them in place and put the bear back together. Soldering initially lead to unsecure connections, so we added a zip to the bear to allow easy access to ensure we could resolve any connectivity issues if they were to potentially occur.  Connection issues also occurred due to components being surrounded by stuffing, so a casing was made to cover the breadboard to ensure no stuffing got into the wiring so as to also avoid any possible fire hazards if any components were to overheat near the stuffing in the bear.

Group 6 – User-interactive Theatrical Props

By Lucas Parrilla Santander, Senthuran Krishnakumar, and Shahn Naseem

USER-INTERACTIVE THEATRICAL PROP

LIGHTALK


PROJECT BRIEF:

We were asked to design a user-controlled prop using the Arduino microcontroller and other needed sensors and actuators. These props could be a unique hat, rabbit ears, umbrellas, chairs, shirts, jackets, and so on, as it is common for actors during a theatrical performance to use props to interact with the audience and inject life into the scene delivered.


OUR PROP:

The prop we have decided to create is a user-controlled LED mask, that lights up and plays different effects depending on what sounds or movements are detected.


MARKET RESEARCH:

Upon researching issues that the theatrical world faces, one of the main issues is the lack of inclusiveness with the deaf society. Theatre involves the use of the voice and physical gestures to express emotions. As a result, stripping away half of the experience from an audience ruins the experience. To tackle this problem, we dissolved what the real problem that the deaf community faced, which is vocal tone. From then, we looked into ways we could convert vocal tone and volume into something visual that the audience could perceive. A plethora of LED masks have been used in performances and can be easily purchased online. The designs of these masks vary, but the foundational design often replicates a facial expression, primarily focusing on the eyes and mouth. They all come with a few pre-set patterns and designs, and a singular remote that controls them (to turn it on or off and to change the colours and effects). This style of changing the effects of the mask is very limited, and we believe we can make that process a lot more interesting. By using a microphone and a motion sensor, we can create a variety of ways for the user to interact with the prop, creating a more immersive experience. Furthermore, the output of the LED strips will always be completely random, essentially creating an infinite number of possible effects and designs, ensuring that whenever the mask is worn a new and unique experience is created.


DESIGN BLOG:

Week 9 – Monday – 21/11/22:

After looking through the different project briefs we decided to go for project 1, which was to create a theatrical prop. We brainstormed different ideas, some of these being a hat, a jacket, and a mask. After going through the feasibility of each idea, we decided to make a mask, but we had to figure out what type of mask we wanted to create. We discussed the different functions and what type of interactions we wanted the mask to have.

Initial Sketches:

We decided to go for the third design: a face mask with a hood. Using a softer material would allow us to hide the Arduino components within the clothing, providing a much cleaner design. The main concept and functionality of the mask were that there would be 2-3 strips. When the user speaks the LED strips will light up, however, the number of LEDs that light up depends on how loudly the user speaks. The LEDs would originate from the centre, and when a microphone detects sound, the LED would light up on a random strip in a random direction. This would allow for a new experience every time the mask was worn. We also decided that we wanted to add a motion sensor, an MP3 player, and a speaker. A motion sensor would allow us to play different effects depending on what direction the user is moving. An MP3 player would allow us to upload different songs and sound effects, which we could then output with the speaker.

Week 9 – Wednesday – 23/11/22:

We looked for the different components we needed for the project. The components we decided to get were an LED strip, a microphone, an MP3 player, a speaker, a motion sensor, a battery pack, a battery charger, and the actual face mask/hood.

Week 9 – Friday – 25/11/22:

The components were finalised, and the order was sent off.

Week 10 – Monday – 28/11/22:

While waiting for the components to arrive, we decided to do some market research and identify our target audience. Our findings and conclusions are presented at the beginning of our webpage.

Week 11 – Monday – 05/12/22:

Some of our components came so we decided to test them out.

Component Testing:

For the LED strip we used the following website for the breadboard layout and the sample code: Sample code for LED Strip
When setting up the breadboard, we realised we didn’t have a 330 ohms resistor, which was the one we needed. I used another resistor as a placeholder and the LEDs turned on, however they didn’t turn the colour we expected them to. All of the LEDs on the strip were supposed to turn red, however, only some of them did. This was because we didn’t have the right resistor, so when we got the right one this issue was resolved.

Sample Code:

Week 11 – Tuesday/Wednesday – 06/12/22 – 07/12/22:

While waiting for the microphone, motion sensor, and speaker to be delivered, we started to think about how our code will look like.

Coding progress:

Week 11 – Thursday/Friday – 08/12/22 – 09/12/22:

Since our components arrived extremely late, we were forced to change our idea.

Design revisions:

When the user speaks into the microphone, the LEDs on the strip will light up, but instead of lighting up from the centre (as it did originally), it will now light up from the beginning of the strip. The louder the user speaks, the more LEDs on the strip will light up, and as the number of LEDs that are lit up increases, the colour of the LEDs will now change. So, if the user is speaking quietly the LEDs will be yellow, if the user speaks at a medium level the LEDs will be orange, and if the user speaks loudly the LEDs will be red. The user is also able to connect the Arduino Uno board to their own device, and easily change the preset colours to whatever they want.

Component Testing v2:

For the microphone we used the following website for the breadboard layout and the sample code: Sample code for microphone
Essentially, the signal that gets picked up by the microphone gets converted to the number of volts powering the breadboard (so in our case 5 volts). This makes it easier for us to check the value of the microphone. After making a few adjustments, we implemented the sample code into our main code and got the LEDs to light up when we spoke into the microphone.

Week 11 – Saturday – 10/11/22:

Final Assembly:

The LED strips were wrapped around the mask, and we connected the circuit to the mask by adding a little slit where we could fit the Arduino breadboard.


PROJECT MANAGEMENT:

GROUP MEMBERALLOCATED TASKS AND COMPLETIONS
ALL– Selecting what we will be creating in response to the design brief
– Creating and updating the blog
– Choosing which components will be used and how the product will work
– Testing and debugging
SHAHN– Market research and analysis
– Assembly
– Blog documentation
– PowerPoint creation
LUCAS– Coding
– Target audience researcher
– Idea developer
SENTHURAN– Design sketches
– Storyboarding
– Blog styling

MAKER’S MANUAL:

Product overview:

The product we created is a face mask that will light up depending on how loudly the user speaks. The louder the user is the more lights will light up, and when the number of lights that light up increases, the colour of the lights will change. So, if a user speaks quietly then the colour of the lights will be yellow, if a user speaks at a medium level, then the colour of the lights will be orange, and if a user speaks loudly then the colour of the lights will be red. To do all of this, we connected a microphone and an LED strip to the Arduino breadboard. The signal the microphone picks up is converted to the number of volts being used to power the circuit, as this makes it easier to monitor the input of the microphone. We used 4 volts instead of 5 to make the lights a bit more sensitive. To get rid of any background noise, we made it so the LEDs will only light up when the microphone signal surpasses the threshold of 0.8 volts. So if the signal inputted into the microphone doesn’t exceed 0.8 volts, then the LEDs will not turn on. To get the volts to surpass 0.8, you must be talking close to the microphone, so only the user will be able to affect the LEDs.

Tools and Supplies:

  • 1x Arduino Uno
  • 1x Breadboard
  • Wires
  • WS2811/12/12B Addressable 5V LED Strip
  • 1x 330 Ohms Resistor
  • 1x 100-1000 Microfarad Capacitor
  • Arduino Compatible Microphone
  • -> We Used The: Adafruit Electret Microphone Amplifier with Adjustable Gain
  • Battery
  • -> We Used The: LiPo Battery Pack (850ma)
  • Battery Charger
  • -> We Used The: LiPo Amigo (LiPo/Lilon Battery Charger)
  • A Mask

Breadboard Layout:

Build Section:

There is nothing that will need to be built for our prop. The user only has to buy a mask and stick the LED strip onto it, and then connect this to the Arduino breadboard which will also have a microphone attached to it. This also can be attached to any prop, not just a mask. So, the user can use this with whatever they want.

Code:

#include <FastLED.h>
#define LED_PIN 2
#define NUM_LEDS 51

const int sampleWindow = 50;  // Sample window width in mS (50 mS = 20Hz)
unsigned int sample;

int colour;
int randomNum;
int numLed = 0;
int maxVol = 4;

double bgNoise = 0.80;
double volts;
double setNoise = 0.80;
double changeVar = (maxVol - bgNoise) / NUM_LEDS;
double greenLVL = 255 - 255 * (((setNoise - bgNoise) / (maxVol - bgNoise)));


CRGB leds[NUM_LEDS];

void setup() {
  Serial.begin(9600);

  FastLED.addLeds<WS2812B, LED_PIN, GRB>(leds, NUM_LEDS);
  FastLED.setMaxPowerInVoltsAndMilliamps(5, 500);

  FastLED.clear();
  FastLED.show();
}

void loop() {
  soundSystem();
  colourSystem();

  Serial.print("setNoise: ");
  Serial.println(setNoise);
  Serial.print("volts: ");
  Serial.println(volts);
  Serial.print("changeVar: ");
  Serial.println(changeVar);

  Serial.println();

  FastLED.show();
}

void soundSystem() {
  unsigned long startMillis = millis();  // Start of sample window
  unsigned int peakToPeak = 0;           // peak-to-peak level

  unsigned int signalMax = 0;
  unsigned int signalMin = 1024;

  // collect data for 50 mS
  while (millis() - startMillis < sampleWindow) {
    sample = analogRead(A0);
    if (sample < 1024)  // toss out spurious readings
    {
      if (sample > signalMax) {
        signalMax = sample;  // save just the max levels
      } else if (sample < signalMin) {
        signalMin = sample;  // save just the min levels
      }
    }
  }
  peakToPeak = signalMax - signalMin;  // max - min = peak-peak amplitude
  volts = (peakToPeak * 5.0) / 1024;
  return volts;  // convert to volts
}

void colourSystem() {
  if (setNoise - volts >= changeVar) {
    leds[numLed] = CRGB(0, 0, 0);
    colours();
    numLed--;
    numLed = constrain(numLed, 0, NUM_LEDS);
setNoise = setNoise - changeVar;
    setNoise = constrain(setNoise, 0.8, maxVol);
    Serial.println("decrease");
    FastLED.show();
  }
  colour = 255 * (volts / 10);
  if (volts - setNoise >= changeVar) {
    leds[numLed] = CRGB(255, greenLVL, 0);
    colours();
    numLed++;
    numLed = constrain(numLed, 0, NUM_LEDS);

    setNoise = setNoise + changeVar;
    setNoise = constrain(setNoise, 0.8, maxVol);
    Serial.println("increase");
    FastLED.show();
  }
}

void colours() {
  for (int i = 0; i < NUM_LEDS; i++) {
    if (leds[i] != CRGB(0, 0, 0)) {
      double greenLVL = 255 - 255 * (((setNoise - bgNoise) / (maxVol - bgNoise)));
      leds[i] = CRGB(255, greenLVL, 0);
    }
  }
}


EVALUATION:

Throughout the coding stages, many tests had to be conducted. Our original idea of having 4 different pathways for the LEDs to randomly go, proved too difficult to complete, so we settled on having it go one way from beginning to end. Furthermore, due to time constraints and limitations, we could not implement the motion sensor, MP3 player, or speaker, which would have all allowed us to create a more complete product. Another limitation we unfortunately faced was the signal the microphone inputted. After significant testing, we adjusted it to cater for background noise, with the aim that it will only pick up sound and light up the LED strip if the user speaks into it. For the most part, it does block out a lot of noise, however, if there is an extremely loud background noise then it will still pick up on the microphone. For example, if multiple people talk loudly next to it. This is not entirely ideal as if this prop is used during a theatrical performance (which it is intended to do), then if there are other actors performing close to the user then it may slightly pick up on the microphone. A possible fix for this could have been to including a user controlled button so it only lights up LED if the user presses the button when they are about to speak.


Page 1

Group12: Monitoring your plants

Monitoring your plants

Group 12

Awais Amjad Noshad Boksh Jordan Chong

Final Image

Chosen Project Brief

You care about your plants, right? Then, why not try Arduino to help you monitor and water them? This project should include a soil humidity sensor that alerts (through some beeping sound or LCD display) when the humidity is too low or too high. It also has to include some automatic irrigation system (see some examples here: https://all3dp.com/2/arduino-watering-system-plant-irrigation-project/). You can also add a light sensor for the amount of light available and an indicator to the user (the carer) in case they need to change the position of the plant accordingly, among other sensors you think would help to keep your plant healthy. Design for providing long term behaviours like the plant thanking you if you have been treating them well (for example, by watering them the last couple of days) and then showing a “Thank you!” message in the display.

Project Plan

We have decided to design a water irrigation system that will be used to periodically water either a single normal-sized plant or multiple smaller plants. This system will be able to measure and display information about the sunlight and temperature in the room where the plants are located. The system will also be able to display the current moisture level of the soil, as well as alert the user if the water level is insufficient or inappropriate for the plants’ needs. The system will include sensors to measure the moisture level and water usage, as well as an automatic control feature that can adjust the water level based on the measured moisture levels. An alert will also be displayed to notify the user if the water level falls outside of the optimal range for the plants.

Target Audience

Our target audience for this water irrigation system is individuals who are interested in gardening and plant care, as well as people who work in professional gardening or horticulture. We also aim to reach people who want to grow plants indoors, such as in an office or apartment setting. Our system is designed to be useful and convenient for anyone who is interested in maintaining healthy plants and ensuring that they receive the optimal amount of water, sunlight, and temperature for their needs. We believe that our system will be particularly appealing to people who want to easily and accurately monitor and control the watering of their plants, and who want to avoid over- or under-watering, which can be harmful to plants. We are confident that our system will be a valuable tool for anyone who is interested in growing and caring for plants, whether for personal or professional purposes.

Instruction Manual

  1. Before placing the container on a solid, level plane, make sure that the container is clean and free of any debris or dirt. This will help to prevent the spread of diseases or pests that could harm your plant.
  2. Once the container is clean and ready to use, carefully position it on a solid, level plane that is higher than the plant. This will help to ensure that the plant has proper drainage and is not sitting in water, which can lead to root rot.
  3. Next, insert the corrosion-resistant moisture sensor and the end of the water pump pipe into the soil, making sure that they are properly positioned and securely in place. The moisture sensor will help you to monitor the moisture levels in the soil, while the water pump will automatically water the plant as needed.
  4. Once the moisture sensor and water pump are in place, fill up the container with water and insert the water sensor. The water sensor will help you to monitor the water level in the container and ensure that the plant has an adequate supply of water at all times.
  5. Finally, sit back and enjoy your plant! Be sure to regularly check the moisture levels in the soil and the water level in the container, and adjust the watering schedule as needed to keep your plant healthy and happy.

Ensuring product safety

  1. Make sure that the container is placed on a stable and level surface to prevent it from tipping over or becoming unstable.
  2. Regularly check the moisture levels in the soil to ensure that your plants are not being over- or under-watered.
  3. Follow the instructions provided with the product carefully to ensure proper setup and use.

By following these steps, you can help to ensure that your plants are well-cared for while using our product.

Circuit Drawing

Market Research

When we began working on our water irrigation system, we looked at various systems that are currently available online. We carefully studied the components that these systems used and how they worked in order to understand the features and capabilities of different irrigation systems. After reviewing many systems with different features and uses, we decided to focus on designing a system that would be useful for anyone who is interested in growing and caring for plants, whether for personal or professional purposes. Our system will provide important information about the temperature, light level, moisture level, and water level in the area where the plants are located, which will help users to maintain healthy plants and avoid over- or under-watering. We believe that our system will be a valuable tool and we are excited to share it with our target audience.

Goals

  • Include a water pump that will water the plant when the soil is dry​
  • Include a soil moisture sensor that can detect low moisture levels with accuracy​
  • When the water supply for the water pump is low, add a water sensor that notifies the user​
  • Include an LCD with a temperature, light, and moisture display​
  • Add a temperature sensor to monitor the environment around the plant’s temperature​
  • Include a photoresistor that gauges the amount of light surrounding the plant​
  • Create a container that is suitable for holding all the necessary components​
  • Make sure user is satisfied/safe with leaving the product to water the plants

Project Timeline

Meetings

21/11/2022 Brainstorming and Designing

To help us visualize our final product, we created hand-drawn and CAD sketches of our water irrigation system. These sketches allowed us to see what our system could potentially look like, and to determine its dimensions and the materials that would be suitable for its construction. By using these sketches, we were able to refine our design and make important decisions about the appearance and functionality of our system

Storyboard

Components

  • Arduino Uno​ X1
  • LCD display​ X1
  • Breadboards X 3
  • Water Pump​ X1
  • Corrosion resistance moisture detector​ X1
  • Water sensor​ X1
  • Plant​ X1
  • Photoresistor​ X1
  • Temperature sensor​ X1
  • Wires​ 30+
  • Resistors​ X2
  • Diode​ X1
  • Transistor​ X1

28/11/2022 Ordering Parts

After careful consideration, we selected the parts that will be used in our water irrigation system. These parts include sensors to measure moisture levels and water usage, an automatic control system to adjust the water level based on the measured moisture levels, and a user interface for control and monitoring.

5/12/2022 Water Pump

After receiving the water pump, we followed the instructions for attaching it to the system. However, we discovered that the attached relay was not adequate for the power source, so we were unable to use it. In order to fix this problem, we removed the relay and connected the pump directly to the Arduino. We then encountered another issue, where the water was not flowing uphill. To solve this problem, we elevated the pump so that the water would always flow downward, ensuring that it reaches the plants. By overcoming these challenges, we were able to successfully integrate the water pump into our system and move forward with testing and refinement.

8/12/2022 Moisture Sensor and LCD

We attached a moisture sensor to our system using an online tutorial. However, the sensor we ordered was not functioning properly, so we replaced it with a different one. We were able to display the measured moisture levels on the LCD screen, but the screen we initially planned to use was too small. We ordered a larger LCD screen, but it had a problem with brightness. After realizing that we had not correctly configured the LCD screen, we followed a tutorial to fix the problem. We also had to adjust the hole in our container for the LCD screen because it did not fit properly. By making these adjustments, we were able to ensure that our water irrigation system was fully functional and ready for use.

9/12/2022 Light and Temperature

We followed the instructions for circuit 10 that we learned in the lab in order to attach the temperature sensor to our water irrigation system. However, we encountered issues with the accuracy of the temperature readings, as they were consistently very high. After trying several different approaches to troubleshoot and fix the problem, we realized that the issue was with the sensor itself, and not with the code. Unfortunately, we ran out of time to order a replacement

For our light sensor, we followed circuit 9 that we learned in the lab, and we did not encounter any issues with it. We were able to successfully attach the light sensor to our system and to use it to monitor the light levels in the area where the plants are located.

Soldering parts for water pump, light sensor and temperature sensor

11/12/2022 Water Sensor

We followed an online tutorial to attach the water sensor to our water irrigation system. However, we encountered an issue with the accuracy of the sensor’s readings. After troubleshooting, we realized that the problem was with the way that the sensor’s raw results were being mapped to the system’s control settings. We were able to fix the problem by adjusting the variables in the map function, which allowed us to properly map the sensor’s raw results to the control settings. By following the tutorial and making the necessary adjustments, we were able to successfully integrate the water sensor into our water irrigation system and to use it to monitor and control the water levels in the plants’ containers. We then joined the components of the system to the container using tape and hot glue, and we were pleased with the final result.

Display when theres enough water
Display when theres not enough water

10/12/2022 Container

When we started designing our water irrigation system, we initially created a paper design for the container that would hold the components of the system. We considered using a 3D printer to create a container using a CAD design, but we decided to explore other options as well. We wrote down a list of potential materials that could be used to make the container, including wood, PET, HDPE, PVC, LDPE, PP, and PS. Each of these materials had unique properties that made it suitable for different applications. After considering the options, we decided to use wood for our container because we believed that it would be strong enough to support the weight of the components and the plants. We were able to find a suitable wooden container among the recycled materials that we had available, and we were able to modify it to meet our specific needs. The container has a 5 cm diameter hole in the center that allows the wires to pass through, and it also has two 2 cm holes on opposite sides of the container that are 7 cm apart from the center. The dimensions are 30 X 15 X 10 (cm) and joined through box joints

Video of product working

Code

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 20, 4);

#define sensor A3

#define wet 239     //340 //210

#define dry 580  //650 //510

int const lightPin = A0;

int const tempPin = A1;

int const waterLvl = A2;

int const waterPump = 7;

void setup() {

  Serial.begin(9600);

  lcd.init();

  lcd.backlight();

  pinMode(waterPump, OUTPUT);

}

void loop() {

  digitalWrite(9, HIGH);

  lcd.clear();

  //moisture sensor

  int value = analogRead(sensor);

  lcd.setCursor(1, 0);

  lcd.print(“Moisture”);

  int moistPre = map(value, wet, dry, 100, 0);

  lcd.setCursor(11, 0);

  lcd.print(moistPre);

  lcd.setCursor(16, 0);

  lcd.print(“%”);

  // Serial.println(moistPre);

  //light sensor

  int lightLevel = analogRead(lightPin);

  int lightPer = map(lightLevel, 900, 0, 0, 100);

  lcd.setCursor(1, 1);

  lcd.print(“Light lvl”);

  lcd.setCursor(11, 1);

  lcd.print(lightPer);

  lcd.setCursor(16, 1);

  lcd.print(“%”);

  // Serial.println(lightPer);

  //temperature sensor

  int reading = analogRead(tempPin); 

  float voltage = reading * 5.0;    //gets reading in voltage

  voltage /= 1023.0;

  float temperatureC = (voltage – 0.5) * 100 ;    //converts voltage to degrees C

  int tempV = analogRead(lightPin);

  lcd.setCursor(1, 2);

  lcd.print(“Tempature”);

  lcd.setCursor(11, 2);

  lcd.print(temperatureC);

  lcd.setCursor(16, 2);

  lcd.print(“C”);

  // Serial.print(temperatureC -40); //display temperature

  // Serial.println(” degrees C”);

  //water level sensor

  digitalWrite(9,HIGH);

  int waterLevel = analogRead(waterLvl);

  waterLevel = map(waterLevel, 0, 540 , 0, 100);    //map(waterLevel, 415,40 , 100, 0)

  delay(10);

  digitalWrite(9,LOW);

  lcd.setCursor(1, 3);

  lcd.print(“Water”);

  lcd.setCursor(7, 3);

  if(waterLevel < 30){

    lcd.print(“pls refill”);

  }

  if(waterLevel>30){

    lcd.print(“enough water”);

  }

  // lcd.print(waterLevel);

  // irrigation system

    if( moistPre <= 20 ){ 

      lcd.clear();

      lcd.setCursor(1, 0);

      lcd.print(“Watering Plant”);

      digitalWrite(waterPump,HIGH);

      Serial.println(“on”);

      delay(5000);

      digitalWrite(waterPump,LOW);

    }

  delay(1000);

}

Makers Manual

Parts needed:

  • Arduino Uno​ X1
  • LCD display​ X1
  • Breadboards X 3
  • Water Pump​ X1
  • Corrosion resistance moisture detector​ X1
  • Water sensor​ X1
  • Plant​ X1
  • Photoresistor​ X1
  • Temperature sensor​ X1
  • Wires​ 30+
  • Resistors​ X2
  • Diode​ X1
  • Transistor​ X1
  • Cuboid container with 5cm diamter hole for wires and two 2cm holes 7cm apart from center for light and temperature sensor

Put circuit together following circuit diagram:

Known shortcomings

The temperature sensor isn’t accurate as it is broken and we couldnt order a replacement in time