2023 Group 7 – SecuroBag

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

Team Members:

  • Run Lin Liu
  • Justin Smith
  • Yesh Chandiramani

Product Description:
In today’s bustling and chaotic world, our attention is constantly pulled in multiple directions, making us more susceptible to theft. The hustle and bustle of crowded places, coupled with attention-grabbing stimuli, has created an environment where unsuspecting individuals become easy targets for thieves. Recognizing this growing concern, we introduce SecuroBag – the innovative backpack equipped with a built-in alarm system designed to not only protect your belongings but also alert you and those nearby of potential criminal activity.

SecuroBag addresses two primary issues: the prevention of pickpocketing (the unauthorized removal of items from an unattended bag) and bag theft (theft of the entire bag). The key to its effectiveness lies in two crucial components: a smart zipper that senses when the bag is opened and a Bluetooth module that notifies the user when the bag is taken out of their immediate vicinity.

Operating SecuroBag is simple yet highly secure. With just a touch of an RFID tag, a user can easily arm and disarm their bag. When armed, any attempt to open the bag without authorization triggers a loud alarm, immediately deterring thieves and preventing further action. Additionally, through Bluetooth technology, SecuroBag sends real-time notifications to the user when the bag has moved away from their immediate surroundings. This feature empowers users to confront and thwart potential thieves, ensuring the safety of their valuables at all times.

Final Product
User Guide

Project Planning

Project Planning Chart

Project Task List


Design Process

Ask (Nov 13 – Nov 15)

In the design process that we embarked on, we started the asking phase by asking each other what problems we have faced in our day-to-day lives. As we shared a list of our problems, there was one mutual problem among us: when we are alone in a cafe or library, we take all our belongings with us to avoid leaving them unattended and end up losing our seats. This problem has bothered all of us for years, and this was an opportunity for us to devise a solution together.

Research (Nov 15 – Nov 20)

After settling on the problem and deciding that university students like us would be our intended audience, we decided to dissect all the pain points and concerns generated by leaving our bags unattended while we were in the bathroom. We came up with the following list:

  • someone stealing your entire bag
  • someone stealing items from your bag (noticeable and unnoticeable)
  • someone opening your bag to slip something inside

We discussed these pain points and concerns among ourselves and friends who have experienced these problems. We realized that we don’t have to make the bag impossible to steal from but need to have some protective measures in place to deter people from tampering with the bag. This insight and listing out the pain points and concerns helped us better understand the problem and our solution.

Imagine (Nov 21 – Nov 22)

With the pain points and concerns in mind, we imagined and discussed some potential solutions. One solution was to create a bag with a GPS tracker (like an Apple air tag) and make the zipper impossible to open by anyone besides the backpack owner. This was the most obvious solution, but it would have been too complex for us to build. The other solution we arrived at was to add an alarm to the bag’s zipper, and it would go off when the zipper was unzipped. This solution fits our needs almost perfectly because it would allow us to know if someone has stolen and/or slipped something from/into the bag, and the alarm would draw the attention of bystanders, causing the thief to be caught in the act. Unfortunately, having an alarm on the bag would not help if the entire bag is stolen, so we came up with the solution of keeping track of when the bag was last in range of the owner and relying on bystanders and security cameras to assist with finding the thief who stole the bag. By stitching the idea of keeping the bag in range and an alarm for the zipper, we settled on an idea for our solution that met the needs of our intended audience.

Storyboards of the Idea
Plan (Nov 22 – Nov 24)

Now that we had a potential solution in mind, we had to plan out how to check if the bag was out of the range of the owner and trigger an alarm when the zipper became unzipped.

Checking if the bag was out of range of the owner
Before we could consider what hardware components could solve our problem, we needed to define what out-of-range means and what assumptions we could make to assist us in prototyping our solution rapidly. Since the problem originated with going to the bathroom in a cafe or library, we decided that our maximum distance in the range had to be more than 20 meters but less than 100 meters. Also, our intended users are university students, so we can assume that they almost always have their phones with them. We hypothesized that a Bluetooth connection between the bag and the owner’s phone would fit our requirements. To validate our hypothesis, one of us wore a pair of Bluetooth earphones connected to a phone that was playing music and went into the bathroom of a local cafe. Despite being 60 meters away, the music continued playing, which meant a Bluetooth connection would suffice for our solution’s use case.

Trigger an alarm when the zipper is unzipped
To implement this idea, we had to break the concept into two components: detecting the zipper’s state and sounding the alarm. To sound the alarm, we decided to use a piezo buzzer because that is a readily available component in our experimenter’s kit. All that was left was to figure out how to detect the zipper’s state. Since the zipper of the backpack we were going to use is metallic, we decided to use that to our advantage and create a circuit that would close when the zipper is unzipped. To make a circuit that closes when the zipper is unzipped, we had to find an area of the zipper track that the zip would pass through when unzipping the bag. Since the zipper track was connected to a nylon material and that circuit must be robust, we decided that sowing conductive thread to the end of the zipper track would be best suited for accomplishing the task.

RFID Authentication
After developing the technical solutions needed to bring our idea to life, we realized that we didn’t have a way to identify if the bag was armed and should sound the alarm when the zipper was unzipped or disarmed and function like a normal bag. After discussing the problem, our initial solution was to use the Bluetooth connection to send arm and disarm commands to the bag’s microcontroller. This solution would have worked fine, but it is not the most convenient or intuitive to our target users, university students, because this process mapped to arming/disarming a house’s security system, and that is not a standard mapping for university students. Therefore, we decided to map the arming/disarming process to the locking/unlocking of one’s car, a process a university student would be much more familiar with. To achieve the mapping of unlocking/locking one’s car, we decided that hovering an authorized RFID token over an RFID reader would accomplish the job.

Prototype Plan
The plan for the prototype was broken down into three distinct components that each team member would be responsible for building:

  • Bluetooth Connectivity (Yesh)
  • RFID Authentication (Justin)
  • Zipper Alarm (Run Lin)
Create (Nov 27 – Dec 6)
Lo-Fi Prototypes (Nov 27 – Dec 1)

Bluetooth Connectivity:
The Lo-Fi prototype for Bluetooth Connectivity was to get the HC05 Bluetooth Module to spawn up an interface named SecuroBag, and read messages sent from the phone to the Arduino. The messages that were sent from the phone were done by using the Android Bluetooth Serial Terminal app. The purpose of this prototype was to identify how to create a Bluetooth connection and communicate between the phone and Arduino. This prototype was a success!

The code running on the Arduino is as follows:

#include <SoftwareSerial.h>

// Set up a Serial interface to between the Arduino and HC05 Bluetooth Module using Pins 2 & 3 for Receiving and Transmitting data
SoftwareSerial myBluetooth (2,3);

void setup() {
  // put your setup code here, to run once:
  // Start the Serial Monitor in the Arduino IDE with a 9600 Baud Rate
  Serial.begin(9600);
  // Start the Serial interface between the Arduino and HC05 Bluetooth module on the 9600 Baud Rate
  myBluetooth.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  // Check if there is data being sent from the Bluetooth Module to the Arduino (Bluetooth Module got the data from the Phone its connected to)
  if (myBluetooth.available()) {
    // Read the available data as a String
    String data = myUart.readString();
    // Print the data to the Serial Monitor in the Arduino IDE
    Serial.println(data);
  }
}

RFID Authentication
The LoFi prototype for the RFID Authentication component was setting up a basic circuit that read an RFID tag and dumped the information about the RFID tag to the Serial Monitor in the Arduino IDE The Arduino code used for this prototype was provided by the MFRC522 Library’s example code. The purpose of this prototype was to identify how the RFID reader should be set up and the experience of reading the RFID tag.

This prototype was particularly tough to get working because we had issues with the wiring and connectivity between the RFID Reader component and Arduino pins. Thankfully, our persistence prevailed, and Justin was able to successfully prototype the RFID Authentication.

Justin Soldering the RFID Reader

Zipper Alarm
The LoFi prototype for the Zipper Alarm was to create a circuit using conductive thread sown to an old pencil case’s zipper track that lights up an LED when the zipper is being unzipped. The purpose of this prototype was to identify how to use the conductive thread on a zipper track to check the state of the zipper and the experience of zipping/unzipping the pencil case with the conductive thread sewn on the zipper track. This prototype was also successfully built!

Run Lin Soldering
Run Lin demonstrating the pencil case prototype

The code for the prototype:

int ledPin = 9;

void setup() {
  pinMode(ledPin, OUTPUT);
}

void loop() {
  // Light up when the circuit is closed (aka when the zip is being unzipped)
  digitalWrite(ledPin, HIGH);
}
HiFi Prototype Design Decisions (Dec 1 – Dec 6)

Using the experience from our LoFi prototypes, we implemented our respective components into one Arduino and the backpack.

External View of the Prototype:
We wanted the prototype to resemble to look of an ordinary bag. We did not entirely achieve this because the Alarm and State LED dangles on the outside of the bag, which is a bit odd. However, we needed to have the Alarm and State LED dangle on the outside of the bag because we needed the visual and audio feedback to be clear to the user. The current external view of the prototype looks more or less like an ordinary bag, which is good enough for a prototype.

Wiring Inside the Bag:
The wiring is mostly contained within the backpack, and the Arduino is powered by a 5V power bank that is in the backpack (second image). The only pieces that are sticking out are the Alarm and State LED (last image).

RFID Reader:
The RFID reader is taped close to the zipper track on the inside of the backpack, which allows the user to easily wave their RFID token to arm or disarm the bag. Since the RFID reader is not perceived at first glance by the user, we intentionally placed a piece of tape on the outside of the bag to signify this hidden affordance. The feedback from the interaction the user may have with the RFID reader is conveyed through sounds produced by the piezo buzzer (the Alarm). We have programmed the buzzer to have three distinct sounds: arming/disarming error, arming success, and disarming success. The error sound starts from a high pitch and progresses to a lower pitch, which maps to the user’s conceptual model of error sounds from games like Mario. Similarly, the success sounds maintain a high pitch and map to the user’s conceptual model of success sounds from games.

Bluetooth Connectivity:
The connection state of Bluetooth has no visible feedback except if the user checks their phone. To combat this, we rely on the piezo buzzer (the Alarm) to play a sound to relay the feedback on the connection state of the Bluetooth module. This fits the conceptual model that a university student may already have when they connect their phone to a Bluetooth audio device.

State LED:
The state LED helps indicate to the user if the bag is currently armed (on) or disarmed (off). The feedback from the LED is crucial for the user because they can quickly understand if their interaction with the bag was successful or not. Moreover, we deliberately used a red LED because people have a mapping of the color red with danger. We want to leverage the idea of danger to deter people from tampering with the user’s bag.

Conductive Thread:
As seen in the first image on the last row, the conductive thread is sewn onto the end of the zipper track. We picked a darkish green color to blend into the dark color of the bag but still be visible to the user upon careful inspection so that they know what position the zipper needs to be in for the bag to be armed.

HiFi Prototype Logic

Since the HiFi prototype has three individual components that need to be operating together, we decided to implement the logic for the prototype through the lens of a Finite State Machine (FSM). The FSM perspective allowed us to easily integrate all the individual components and constrain the available actions with the prototype. By constraining the available actions, we are able to minimize human error.

Our process of devising the state machine logic was as follows:

  1. Identify all possible states for the prototype
  2. At each state, think about all possible actions that can occur for the state and decide if those actions are necessary
  3. For all necessary actions, draw an error from the start state to the end state and label the action and its effects on the prototype
  4. After all the actions for all the states have been outlined, go through different scenarios of using the prototype and operate the logic using the state machine diagram

Final State Machine Diagram:

An example of minimizing human error by limiting the actions to only the necessary actions is only allowing the bag to be armed when the Bluetooth connection to the owner’s device is established because the Bluetooth connection is core to the thesis of our prototype— having theft detection mechanisms in place will deter people from tampering with one’s bag.

Testing (Dec 7 – Dec 8)

Our testing methodology for the HiFi prototype involved comprehensive run-throughs of the bag’s workflow in accordance with the state machine diagram. These workflows were designed to validate the prototype’s efficacy in safeguarding users’ belongings.

HiFi Prototype Testing
Testing Evaluation

The primary emphasis was placed on the alarm system, with the objective of ensuring it is activated only when necessary. The goal was to prevent any unwarranted alarms that could potentially induce panic without cause. Through repeated simulations, we meticulously verified that the alarm functioned precisely as intended, activating only in response to genuine security threats. This meticulous approach aimed to eliminate any possibility of false alarms, thereby providing users with a reliable and stress-free experience. The video above demonstrated the capabilities of the HiFi Prototype and everything we set out to achieve with respect to functionality was successful!

Known Shortcomings & Improvements (Dec 9 – Dec 10)

The primary drawback we identified pertains to the out-of-range notification, where Bluetooth disconnection was found to be less reliable in preventing unwarranted alarms. After careful consideration, we opted not to trigger the alarm solely based on Bluetooth disconnectivity, recognizing its limitations in ensuring accurate alerts.

To address this concern and enhance the reliability of the out-of-range notification, several viable solutions were explored. One option involves upgrading to a more advanced Bluetooth chip to improve signal stability. Additionally, integrating a GPS module directly into the bag emerged as a potential solution, allowing for precise distance detection from the user. Another consideration involved implementing an accelerometer to discern the movement of the bag, providing an additional layer of context to the notification system.

Ultimately, a combination of these solutions could be explored to create a robust and comprehensive approach to the out-of-range notification feature. By adopting such enhancements, we aim to deliver a more dependable and effective SecuroBag, ensuring users receive accurate notifications without compromising on the reliability of the alarm system.


Maker Manual

Tools & Supplies

In the creation of our backpack, the tools and supplies used were:

  • Arduino & Breadboard
  • Resistors
  • Wires
  • Piezo Buzzer
  • Red LED 
  • RC522 RFID Reader & Tag
  • HC05 Bluetooth Transmitter
  • Conductive Thread
  • Soldering Iron
  • Wire Strippers
  • Backpack
  • Android smartphone & Serial Bluetooth Terminal App

Circuit Layout

A circuit diagram of the Arduino board setup

Build Section

The backpack consists of 7 main physical components. The zipper sensor, the Alarm, the State LED, the RFID reader, a Bluetooth module, an Arduino microcontroller for logic, and, of course, the backpack itself. Execution of each component is as follows:

Smart Zipper

The smart zipper aims to detect if a bag has been opened. We do this by creating two contact points using conductive thread to detect if a zipper is in a certain position. The contact points act as a switch for the Arduino, closing a circuit with the zipper when the bag is closed.

The Alarm and State LED

The Alarm:
The alarm is composed of a piezo speaker that sits outside of the bag. When ringing, the piezo speaker sounds intermittently, alerting people nearby to the theft taking place. The piezo also serves to provide audio feedback when connecting the Bluetooth module of the bag and when arming the bag.

The State LED:
The State LED is connected to the Arduino and runs to the outside of the backpack using copper wires. We currently leave a small gap in the zipper for the LED and speaker. A more elegant solution would be to create a small hole in the bag for the LED and speaker to be put through and sewn into place, but as we are using one of our own bags for prototyping, we will use the zipper gap workaround to avoid permanent damage to the bag.

RFID Authorization

For authorization, the RFID reader is placed near the top of the bag for ease of access. This allows the user to easily tap to arm and disarm the bag. For added security, the RFID reader is housed inside the bag to prevent any potential thieves from tampering with the reader.

Bluetooth Connectivity

The Bluetooth module allows the user to connect their smartphone to the bag and monitor its whereabouts. This module is connected directly to the Arduino’s breadboard. Similar to the RFID reader, the module is placed within the bag.

Putting it All Together

Connecting the digital components together is the Arduino and breadboard, secured to the bottom of the backpack.

The backpack houses everything needed to secure itself.

Code

Sound.ino
const int piezoPin = 5;
const int tempo = 200;

void Sound_Setup() {
  pinMode(piezoPin, OUTPUT);
  digitalWrite(piezoPin, HIGH);
}

// Sound that is played with there is an error with arming/disarming
void Sound_Error(){
  char notes[]="gbba";
  for (int i = 0; i < 6; i++) {
    _playNote(notes[i], 800);
    delay(tempo);
  }
}

// Sound that is played when the bag is successfully disarmed
void Sound_DisarmSucc(){
  char notes[]="fga";
  for (int i = 0; i < 6; i++) {
    _playNote(notes[i], 800);
    delay(tempo);
  }
}

// Sound that is played when the bag is successfully armed
void Sound_ArmingSucc(){
  char notes[]="edc";
  for (int i = 0; i < 6; i++) {
    _playNote(notes[i], 800);
    delay(tempo);
  }
}

// Sound that is played to signify that Bluetooth is connected
void Sound_BTConnected(){
  char notes[]="ecd";
  for (int i = 0; i < 6; i++) {
    _playNote(notes[i], 800);
    delay(tempo);
  }
}

// Sound that is played to signify that Bluetooth is disconnected
void Sound_BTDisconnected(){
  char notes[]="dce";
  for (int i = 0; i < 6; i++) {
    _playNote(notes[i], 800);
    delay(tempo);
  }
}

// The alarm sound to signal that the bag's security has been breached
void Sound_Alarm(){
  char notes[]="aa";
  for (int i = 0; i < 6; i++) {
    _playNote(notes[i], 800);
    delay(tempo);
  }
  delay(tempo);
  for (int i = 0; i < 6; i++) {
    _playNote(notes[i], 800);
    delay(tempo);
  }
} 

// Private helper function to play a note
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) {
      tone(piezoPin, tones[i], duration);
    }
  }
}
Zipper.ino
const int zipperPin = 4;
const int ledPin = 8;

void Zipper_Setup() {
  pinMode(zipperPin, INPUT);
  pinMode(ledPin, OUTPUT);
  Zipper_SetLEDTo(LOW);
}

bool Zipper_IsClosed() {
  // Zipper circuit is open, which means zipper is closed
  return digitalRead(zipperPin) == LOW;
}

void Zipper_SetLEDTo(int highOrLow) {
  // Write the given value to the LED pin
  digitalWrite(ledPin, highOrLow);
}
RFID.ino
#include <SPI.h>
#include <MFRC522.h>

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

void RFID_Setup() {
  SPI.begin();         // Initiate  SPI bus
  mfrc522.PCD_Init();  // Initiate MFRC522
}

RFIDResult RFID_Check() {
  // Look for new cards
  if (!mfrc522.PICC_IsNewCardPresent()) {
    return NOSCAN;
  }
  // Select one of the cards
  if (!mfrc522.PICC_ReadCardSerial()) {
    return NOSCAN;
  }

  // Get RFID content
  String content = "";
  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));
  }
  content.toUpperCase();

  //change here the UID of the card/cards that you want to give access
  if (content.substring(1) == "A3 E7 00 0D" || content.substring(1) == "04 8E 55 1A 4B 3F 80") 
  {
    // Serial.println("Access granted.");
    // Serial.println();
    return AUTH;
  } else {
    return UNAUTH;
  }
}
BT.ino
#include <SoftwareSerial.h>

#define BT_RX 2
#define BT_TX 3

const int BT_BAUD_RATE = 9600;
const int BT_STATE_PIN = 6;

// Create Bluetooth Serial Interface using port 2 for receiving data and port 3 for transmitting data
SoftwareSerial btSerial(BT_RX, BT_TX);

// Bluetooth connection state
int connState = 0;

// Begin Bluetooth Serial Interface with a 9600 Baud Rate
void BT_Setup() {
  // Start interface at 9600 baud rate
  btSerial.begin(BT_BAUD_RATE);
  Serial.println("Bluetooth is running");
  // Print bluetooth connection state
  pinMode(BT_STATE_PIN, INPUT);
}

// Send message to device through bluetooth
void BT_SendMsg(String msg) {
  btSerial.println(msg);
}

// Read message from device through bluetooth
String BT_ReadMsg() {
  if (btSerial.available()) {
    String msg = btSerial.readString();
    msg.trim();
    return msg;
  }
  return "";
}

// Check if bluetooth module is connected
bool BT_IsConnected() {
  int currState = digitalRead(BT_STATE_PIN);
  if (currState != connState) {
    connState = currState;
    _printConnectState();
  }
  return connState;
}

// Private helper function to print BT connection state
void _printConnectState() {
  if (connState == 1) {
    Serial.println("Bluetooth Connected");
  } else {
    Serial.println("Bluetooth Disconnected");
  }
}
Main.ino (uses the functions from all the other sketches)
// SecuroBag State Machine States (refer to diagram)
enum State {
  DisarmedBTDisconnected,
  DisarmedBTConnected,
  ArmedBTConnected,
  ArmedBTDisconnected,
  Alarm,
};

// Status of RFID module
enum RFIDResult {
  AUTH,
  UNAUTH,
  NOSCAN
};

// Keep track of State Machine's current state
State currState = DisarmedBTDisconnected;
// Track how many unauthorized RFID scans occurred during armed state
int errCount = 0;

// State Machine initilization process
void initStateMachine() {
  currState = DisarmedBTDisconnected;
  errCount = 0;
}

void setup() {
  Serial.begin(9600);
  // Setup bluetooth module
  BT_Setup();
  // Setup RFID module
  RFID_Setup();
  // Setup Zipper circuit
  Zipper_Setup();
  // Setup Sound modules
  Sound_Setup();
  // Initialize state machine
  initStateMachine();
  // Ready for action!
  Serial.println("SecuroBag is ready");
  // DEBUG: Print current state
  printState();
}

void loop() {
  // DEBUG: log state
  State prevState = currState;

  // Get status of RFID module
  RFIDResult scanResult = RFID_Check();

  // Execute actions based on the current state of the State Machine
  switch (currState) {
    case DisarmedBTDisconnected:
      // Reset error count
      errCount = 0;

      // Check if any RFID is being scanned
      if (scanResult != NOSCAN) {
        Serial.println("Play Arming Error Sound");
        Sound_Error();
      }
      // Check if Bluetooth is connected
      else if (BT_IsConnected()) {
        currState = DisarmedBTConnected;
        Serial.println("Play Bluetooth Connected Sound");
        Sound_BTConnected();
        // Send connected message to device via BT
        BT_SendMsg("Connected to SecuroBag");
      }
      break;
    case DisarmedBTConnected:
      // Reset error count
      errCount = 0;
      // Recheck if RFID is scanned
      scanResult = RFID_Check();
      // Check if bag is trying to be armed
      if (scanResult == UNAUTH || (scanResult == AUTH && !Zipper_IsClosed())) {
        if (scanResult == UNAUTH) {
          Serial.println("unauth");
        } else {
          Serial.println("zipper not closed");
        }
        Serial.println("Play Arming Error Sound");
        Sound_Error();
      }
      // Bag is successfully armed
      else if (Zipper_IsClosed() && (scanResult == AUTH || BT_ReadMsg() == "arm")) {
        currState = ArmedBTConnected;
        Serial.println("Play Armed Sound && Turn On LED");
        Sound_ArmingSucc();
        Zipper_SetLEDTo(HIGH);
        // Send msg to device through BT about state change
        BT_SendMsg(stateToString());
      }
      // Check if Bluetooth disconnected
      else if (!BT_IsConnected()) {
        currState = DisarmedBTDisconnected;
        Serial.println("Play Bluetooth Disconnected Sound");
        Sound_BTDisconnected();
      }
      break;
    case ArmedBTConnected:
      // Check if bag is trying to be disarmed
      if (scanResult == UNAUTH) {
        Serial.println("Play Disarming Error Sound");
        Sound_Error();
        errCount++;
      }
      // Bag is successfully disarmed
      else if (scanResult == AUTH || BT_ReadMsg() == "disarm") {
        currState = DisarmedBTConnected;
        Serial.println("Play Disarmed Sound");
        Sound_DisarmSucc();
        Zipper_SetLEDTo(LOW);
        // Send msg to device through BT about state change
        BT_SendMsg(stateToString());
      }
      // Check if Bluetooth disconnected
      else if (!BT_IsConnected()) {
        currState = ArmedBTDisconnected;
        Serial.println("Play Bluetooth Disconnected Sound");
        Sound_BTDisconnected();
      }

      // Always check if zipper is not closed or error count == 3
      if (!Zipper_IsClosed() || errCount == 3) {
        currState = Alarm;
        // Send msg to device through BT about state change
        BT_SendMsg(stateToString());
      }
      break;
    case ArmedBTDisconnected:
      // Check if bag is trying to be disarmed
      if (scanResult == UNAUTH) {
        Serial.println("Play Disarming Error Sound");
        Sound_Error();
        errCount++;
      }
      // Bag is successfully disarmed
      else if (scanResult == AUTH) {
        Serial.println("Play Disarmed Sound");
        Sound_DisarmSucc();
        Zipper_SetLEDTo(LOW);
      }

      // Always check if zipper is not closed or error count == 3
      if (!Zipper_IsClosed() || errCount == 3) {
        currState = Alarm;
      }
      break;
    case Alarm:
      // Make sure sound has on and off intervals to do other checks
      Serial.println("Play Alarm Sound");
      Sound_Alarm();

      // Recheck if RFID is scanned
      scanResult = RFID_Check();

      // Bag has been successfully disarmed
      if (scanResult == AUTH || BT_ReadMsg() == "disarm") {
        Zipper_SetLEDTo(LOW);
        if (BT_IsConnected()) {
          currState = DisarmedBTConnected;
          // Send msg to device through BT about state change
          BT_SendMsg(stateToString());
        } else {
          currState = DisarmedBTDisconnected;
        }
        Sound_DisarmSucc();
        delay(500);
      }
      break;
  }

  // DEBUG: print state changes
  if (prevState != currState) {
    Serial.print("State changed to: ");
    printState();
  }
}

// Helper function to create message to be sent through BT about SecuroBag state
String stateToString() {
  switch (currState) {
    case DisarmedBTDisconnected:
    case DisarmedBTConnected:
      return "Status: Disarmed";
    case ArmedBTConnected:
    case ArmedBTDisconnected:
      return "Status: Armed";
    case Alarm:
      return "Status: Bag has been breached!";
  }
}

// DEBUG: Print SecuroBag State Machine states for debugging purposes
void printState() {
  switch (currState) {
    case DisarmedBTDisconnected:
      Serial.println("Disarmed, Bluetooth Disconnected");
      break;
    case DisarmedBTConnected:
      Serial.println("Disarmed, Bluetooth Connected");
      break;
    case ArmedBTConnected:
      Serial.println("Armed, Bluetooth Connected");
      break;
    case ArmedBTDisconnected:
      Serial.println("Armed, Bluetooth Disconnected");
      break;
    case Alarm:
      Serial.println("ALARM");
      break;
  }
}

2023 Group 5 – Fairy Wings

Design blog

A holistic view was adopted to select the materials we used to ensure user friendliness, efficient functioning of the circuit and keeping in mind the stage setup, lighting and the impact of the wings on the performance.

  • Iridescent paper – it reflects well on the stage where the spotlight will only focus on the actors and its pitch dark all around. It stands out well. This also means it reflects the led lights better
    It is also light weight.
  • Craft wire – they are light weight and allow to mimic the realistic veins of the wings. Also they are light weight so, the actor doesn’t need to carry much weight and they still uphold the structure of the wings.
  • Buttons – In order to disguise the buttons, we have put them as a pendant. This way, the buttons are easily accessible to the user and also seems like a part of the accessories a fairy would wear.
  • 6-inch servo elongated arms – since the wings are quite large and wide, the servo arms of the SG90 servo cannot cover much surface area of the wings to make them flutter effectively. 6-inch servo elongated arms.
  • Small breadboard – To allow the user to control the wings and the LED strip, a connection had to be established between the back where the Arduino board is and around their neck. Instead of soldering the buttons to the wires directly, using a smaller breadboard allows the buttons to be mounted safely and securely and also ensures that the user won’t be harmed if the wires were soldered to the buttons directly rather than the other way around.
  • Potentiometer – Potentiometer allows to map a range of values between 0 and 1023 based on the analog input read. This helps to transition between a large range of colors smoothly. The twisting feature of the potentiometer is also quite intuitive for the user to use
  • Buttons – Instead of smaller buttons, we got larger buttons that could also pass as gems on the necklace and are easier to interact with instead of the small ones, making it more user friendly.
  • 9V Battery – required to power the circuit and specifically the LED strip.

How does the user interact?

The Arduino board is mounted behind the user and is connected to the wings and LED strips. As a result, another breadboard that is accessible to them, simple to operate, and doesn’t get in the way of their performance has to be given to them. We thought of three ways for the user to interact with the system:

  • Idea 1 – the user interacts via a bracelet around their wrist.
  • Idea 2 – the user interacts via the necklace around their neck.
  • Idea 3 – the user interacts via a staff or a wand in their hand.

All of these ideas can be easily disguised as accessories a fairy would wear hence, they fit well with the costume. Considering the frequent hand movements during the performance, we decided to go with the necklace around the user’s neck. This way, it’s easily reachable, won’t interfere with their movements and ensures that the connection between the Arduino board at the back and the necklace remains secure. Hence, to ensure the functionality isn’t compromised while the performance, the necklace idea was chosen in the end.

Design principles

Visibility – he user can quickly identify which controls to use owing to the necklace they wear during performances. Similar sequins have been stuck to the button and potentiometer used to control the lights, making it evident how functionally related they are.

Affordance – Using buttons instead of any other input device is to use familiarity of the user with the object to make it easy for the user to understand how it works. People are aware how buttons are clickable.

Feedback -Every user interaction generates feedback. By pressing the blue button, the RGB led strip can be turned on or off to provide visual feedback. The sound of the servo arms moving provides haptic and auditory input when the wings begin to flutter upon pushing the red button. Additionally, when the potentiometer is twisted, the RGB led strip’s colors shift visually.


Sketches and prototypes

Prototype 1

Idea behind the functionality:

  • The wires are connected to the breadboard
  • Wires extend all the over the shoulder and mimic as a necklace as a user interface – the buttons acts as gems on it
  • Press the button to flutter the wings
  • Press the button to turn on and off the LED strip
  • The potentiometer is also allows controlling the different colors of the LED lights.
LED lights testing

We decided to test each functionality and circuit individually first and then put them all together for the prototype. This was to make sure that all the functionalities are coded and that they are not dependent on other functionality.

We first started working with the LED strip. Testing out the code and working out whether we can control it with button. Installed an additional library, FastLED for coding the LED strip and then completed the circuit by connecting the LED to a 330 ohm blue resistor and a capacitor.

Servo testing

Making the first quick prototype to test out the capacity of the servo to move the small size wings. This is also to test out how the servo can be connected to the wings.

Prototype 2

Changing the size of the wings to full size to test out the fluttering with the servos. Sizing up the wings needed 2 servos instead of 1. A single servo cannot handle the weight of the big wings and establishes 2 points of contact with the wing.

Final Prototype

Craft wire wings

While we are working on the functionality of the wings and the LED lights, we start working on the final design of the wings made of craft wire.

The wire was quite flimsy alone, we chose a weaker wire so that it would be easier to work with, also for the lightweight property, however this also meant that it wasn’t so strong or immune to damage. Adding all the details inside provided some structure and made the initial wing frame much stronger. To connect each piece of wire to another, I coiled one around the other – this also provided more structure and made it much more sturdy.

Cellophane

The cellophane seemed quite thick initially, we wanted the wire to show through in the middle section as this was a key aesthetic feature in the design – the wings should mimic those of a butterfly. We realised the cellophane could be split into two pieces which made it thinner. We did this for both wings so the wire details came through as intended.

After we taped the entire wire wing and stuck it to the cellophane, we pinched the paper around the cellophane to secure it. In come places, this made it rip in some places so we had to remove the paper and stick it down less taught. This was difficult as we had to get the right ratio of having the cellophane paper loose enough so that it wouldn’t rip but also not too loose otherwise wrinkles would appear in the wing. The wrinkles were not pleasing at all, aesthetically, so we used trial and error before we were happy with how the cellophane looked and stuck it properly.

After this the paper was cut to size with about 5-8 cm extra around the edges. We then used a lighter to seal the edges, since there was so much extra cellophane it wasn’t burning correctly and morphed in a strange way. We then cut again leaving only 1-2cm. Since it was now too short the cellophane was sticking to the wire with a gap in between and the two pieces weren’t sticking to each other. After pinching the cellophane together first and then applying heat, the cellophane sheets moulded into each other and then the wire as initially intended.

Servo testing with the final wings

Trying out the MG996R servo for the final wings. The bigger servo was stronger and could easily move the wings to make them flutter.

Another iteration from the previous carboard wings was to attach long arms to the servo arms to cover more surface area on the wings and help them flutter better.

Soldering

We needed the LED lights on both the wings, so had to cut the the LED strip into 2 pieces and solder 3 pin female header on the ends of it.

Potentiometer Testing

testing out the code for the potentiometer independent of the buttons to test out its independent functionality.

Back support

U – shaped back support created with the metal craft wire. The U-shaped wire is slotted inside the waistband user wears to wear the wings. The servos are attached to this support.

This was an unsuccessful iteration because the wire that is attached to the wings restricted the movement of the wings when fluttering. Also because

Final support

Project Task List

Making the first quick prototype to test out the capacity of the servo to move the small size wings. This is also to test out how the servo can be connected to the wings. Sizing up on the wings

As an overview, the workload was divided based on everyone’s strengths.

  • Amrina – responsible for the making of the final metal wings and back support
  • Halak & Jess – responsible for prototyping, circuit and testing out the functionality with code

Maker Manual

Contents

  • Overview
  • Tools
  • Supplies
  • Circuit Diagram
  • Building instructions
  • Code
  • Testing
  • Possible improvements

Overview

A stunning set of wearable wings suitable for any fairy to step into their own spotlight!

​By using the costume-coherent attached amulet, the lights can be discretely toggled and colour-changed in real time by the wearer without breaking immersion. The same control system can also be used to toggle wing flapping to further enhance the performance. 

The straps are tied around the torso so that the wings can be worn, and the amulet can be worn around the neck. The Arduino board is mounted to the back to minimize its visibility to the audience. The amulet and its strings can be decorated to match the costume. The cellophane foil covering the wire is lightweight and light-reflective to allow for easier servo operation whilst standing out in a theatrical environment. 

​ 

Tools

  • Pliers 
  • Lighter
  • Wire strippers 
  • Pen/pencil 
  • Scissors 
  • Tape: consider masking tape, double sided and clear cellotape 
  • Screwdriver 
  • Soldering supplies 

Supplies

  • Craft wire 
  • Iridescent cellophane 
  • 330 ohm blue resistor
  • 25v capacitor
  • SG90 servos × 4 
  • 6-inch servo elongated arms (3D printed by Dave) 
  • RGB strip WS2812B – 30 or 60 LEDs per metre is fine – 1.5-2m of strip is enough 
  • Female 3-pin header x 2 (for soldering) 
  • Female single pin headers 
  • Roll wires for the “amulet” 
  • Plenty of pin (male-male) wires 
  • Large buttons × 2 
  • Potentiometer × 1 
  • Arduino board × 1 (including breadboard) 
  • Mini breadboard × 1 
  • 9V battery and snap connector 
  • Cardboard  (made out of old recycled boxes)
  • old birthday decorations (repurposed)
  • Optional embellishments on wires/buttons (such as sticky sequins and ribbons) 

Circuit diagram and Layout

​ 

​ 

​ add the circuit pic above 🙂

Building Instructions

  1. Draw out one wing on the cardboard and cut it out. Use this as a stencil for the wire. 
  2. Cut around 1m of wire and make the outline of the top section of the wing using the cardboard as a guide. 
  3. Using around 0.5m of wire create the bottom section of the wing. 
  4. Attach the top and bottom by spiralling a piece of wire around the section where they touch. The spiral also makes the wire sturdier. 
  5. Using the cardboard sketch as a guide, create the inside details of the wing. Again, attach each piece by creating a spiral of wire. 
  6. Use double sided tape to cover all the wire – small gaps are fine, but the wire should be at least 80% covered 
  7. Measuring the length of one wing, top to bottom, cut two pieces of cellophane 
  8. Place the taped wing carefully onto one piece of cellophane. Place the other piece of cellophane on top, ensure there are minimal wrinkles but that it is not too taught as you need room to pinch it around the wire. 
  9. Softly, pinch the cellophane around the outside of the wing before pinching around each of the wires. Do not pinch too hard as the cellophane will rip. 
  10. Turn the wing over and repeat this on the other side to make sure the cellophane is stuck to the wire outline on both sides. 
  11. Cut around the cellophane leaving around 1-2cm past the wire 
  12. To seal the cellophane around the wire, pinch it together then carefully use a lighter to heat it up, so it burns and moulds together around the wire. Make sure the cellophane is just above the flame and doesn’t actually touch it i.e. you’re applying heat not setting it on fire, a flame is used since it helps focus the heat over a small area. (Take extra care of surroundings and make sure your hand isn’t close to any open flame. 
    • Alternatively, if the cellophane is cut to size, cello tape can be used to seal it over the wire however, this can look messy and using a lighter gives a cleaner finish. 
  13. Repeat steps 2-12 to make the second wing. 
  14. Attaching the longer servo arms to the servos, position two servos along the inside of each wing, then stick the arms to the wings. The servo arms should be parallel. 
  15. Using wire, connect the two servos on both sides to reinforce them – do this on both wings. 
  16. Then connect the wings by using wire to connect the wire supports that were made in step 15. The connections should run horizontally, one at the top, and one at the bottom to create a square structure. 
  17. To strengthen the support, add connections from the top horizontal wire support down to the bottom in three, equally spaced points. The support should be strong enough to support the servos and keep the wings in place, but not so strong that the wings are rigid and stiff – they should still be able to flutter elegantly. 
  18. Cut the RGB strip to the desired length. 
  19. The 3-pin headers must then be soldered to the side of the strip indicated by the arrow.  
  20. Remove the backing and stick it down. If sticking along the outside frame, cello tape may be needed to reinforce it as the strip may not stay in place along the edge of the wire. 
  21. Wire up the mini breadboard to the two buttons and potentiometer 
  22. Use the longer leads to connect the components of the mini breadboard back to the Arduino Uno board 
  23. Using the recycled gold strips, wrap the leads tightly together to give it the appearance of a necklace. 
  24. Add gems to the buttons and potentiometer to also disguise them as a pendant in the necklace. 
  25. Connect the servos and RGB strips to the Arduino board and breadboard.  
  26. Create/stick the cardboard box to the wire support between the wings. Make sure this is on the correct side (the side that won’t be touching the wearer’s back). 
  27. Place the Arduino board, carefully, into the box along with all wiring. The ‘necklace’ (mini breadboard does not go inside so naturally some wiring will not fit fully inside the box – this is okay). 
  28. Add the strings to the top of the wire support – these are so that the wings can be worn by tying them around the wearer’s arms. 
  29. Add embellishments as desired. 

Code

// code by Halak & Jes :))))
#include <Servo.h>
#include <FastLED.h>
#define LED_PIN 5
#define NUM_LEDS 99  // we have 99 leds

Servo myservo;  // create servo object to control a servo         
Servo myservo2;
Servo myservo3;
Servo myservo4;

int pos = 0;
bool servoMoving = false;
bool lightOn = false;


const int potPin = A0;      // potentiometer pin (analog)
const int lightBtnPin = 2;  // the button to turn on lights
const int flapBtnPin = 3;  // button to control servo

// variable for reading the pushbutton status 
int buttonStateL = 0;  // for lights
int buttonStateS = 0;  // for servos
int potVal = 0;

int pressesL = 0;
int pressesS = 0;
CRGB leds[NUM_LEDS];

// global r,g,b values approach
int red = 255;
int blue = 0;
int green = 200;

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

  FastLED.addLeds<WS2812, LED_PIN, RGB>(leds, NUM_LEDS);
  FastLED.setMaxPowerInVoltsAndMilliamps(5, 500);
  FastLED.clear();
  FastLED.show();

// pinMode(lightBtnPin, INPUT_PULLUP);

  pinMode(lightBtnPin, INPUT);
  pinMode(flapBtnPin, INPUT);
  // Potentiometer doesn't need definition, just analogRead();

  myservo.attach(10);  // attaches the servo on pin 9 to the servo object
  myservo2.attach(11);
  myservo3.attach(12);  // attaches the servo on pin 9 to the servo object
  myservo4.attach(13);

  // interrupt
  //pinMode(INTERRUPT_PIN, INPUT_PULLUP);
  pinMode(flapBtnPin, INPUT_PULLUP);
  attachInterrupt(digitalPinToInterrupt(flapBtnPin), interruptServo, FALLING); // trigger when button pressed, but not when released.
  //attachInterrupt(digitalPinToInterrupt(lightBtnPin), interruptLight, FALLING);
}


void interruptServo() {
  Serial.println("interrupted");

  if(servoMoving == true){
    servoMoving = false;
  }
}

// void interruptLight() {
//   Serial.println("interrupted");
//   updateLights();
// }


void turnAtoB(int a, int b, int speed) {  // a to b, a < b
  for (pos = a; pos <= b; pos += 1) {
    myservo.write(pos);  // tell servo to go to position in variable 'pos'
    myservo2.write(pos);
    myservo3.write(pos);
    myservo4.write(pos);
    delay(speed);  // waits 15ms for the servo to reach the position
  }
}

void reverseAtoB(int a, int b, int speed) {  // a to b, a > b
  for (pos = a; pos >= b; pos -= 1) {
    myservo.write(pos);  // tell servo to go to position in variable 'pos'
    myservo2.write(pos);
    myservo3.write(pos);
    myservo4.write(pos);
    delay(speed);  // waits 15ms for the servo to reach the position
  }
}


void colourStrip(int g, int r, int b) {
  for (int i = 0; i < NUM_LEDS; i++) {
    leds[i] = CRGB(g, r, b);  //
    FastLED.show();
  }
}


void dialcol(int in) {  // input should be potentiometer value
  // logically, colour cycles are just shifting the distribution of RGB between two at a time.
  // see: R=255,B=0 -> R=0, B=255 goes through red, pink, purple, blue (keeping last value 0 to keep it light);
  // we do this for RB, BG and GR: shifting 255 values 3 times, so x of 765 "points" to map onto 0-1024

  // first off, map where the potentiometer is on its cycle
  int mapped = map(in, 0, 1023, 0, 765);

  // now work out: is it RB[0], BG[1] or GR[2]?
  int phase = mapped / 255;  // int divide
  int rem = mapped % 255;    // modulus: this is how far in we are (first val of pair)

  if (phase == 0) {  // RG
    red = rem;
    green = 255 - rem;
    blue = 0;
  } else if (phase == 2) {  // GB
    green = rem;
    blue = 255 - rem;
    red=0;
  } else {  //BR
    blue = rem;
    red = 255 - rem;
    green=0;
  }
  // reload lights if they're on
  if(pressesL %2 != 0){
    colourStrip(green, red, blue);
  }
}

void updateLights() {
  if(lightOn ==true) {
    colourStrip(green, red, blue);
  } else {
    colourStrip(0,0,0);
  }
}

void loop() {

  delay(100);
  buttonStateL = digitalRead(lightBtnPin);
  delay(100);
  buttonStateS = digitalRead(flapBtnPin);
  
  potVal = analogRead(potPin);
  dialcol(potVal);

  // check if the pushbutton is pressed.
  //   if it is, the buttonState is HIGH:
  // of buttonstate is on - then only read the potentiometer and change the colour
  // if (buttonStateL == LOW) {
  //   pressesL++;
  //   if (pressesL % 2 != 0) {
  //     Serial.println("led on");
  //     colourStrip(green, red, blue);
  //   } 
  //   else {
  //     Serial.println("led is turned off");
  //     lightOn = false; 
  //     colourStrip(0,0,0);
  //   }
  // }
  colourStrip(green, red, blue);

  if (buttonStateS == LOW) {
    pressesS++;
    if (pressesS % 2 == 0) { // even: turn off
      Serial.println("its even, so the servo is off");
      servoMoving = false;
    } else {
      Serial.println("its odd, so the servo is on");
      servoMoving = true;
    }
  }

  if(servoMoving ==true) {
    Serial.println("servoMoving");
    int min = 0;
    int max = 100;
    int spd = 15;
    turnAtoB(90, 140, spd);
    reverseAtoB(140, 90, spd);
    // i think (the first two servos) need to go 180 to 140
  }
  //updateLights();
}

​ Circ 07, Circ 04 were used as a reference for the code for the push buttons and the servos. FastLED library was used for the coding the addressable LED strip

Testing

Testing was conducted at every stage of the building process. Firstly, the RGB strips were programmed to output a single colour to ensure all LEDs were functional; they were also tested after being soldered to the headers to ensure the 3-pin header had been joined properly, and then again when the button input had been wired. 

The mini breadboard was wired to connect two buttons and a potentiometer to the main arduino. We used a sketch that printed different outputs to the serial monitor when it detected each button press, and kept a record of previous state to ensure buttons were togglable. We also printed the value of the potentiometer at regular intervals. When we were certain all input methods were responsive and wired correctly, we connected the RGB strip to the arduino and debugged a sketch which took inputs from the potentiometer and mapped them to an RGB output. 

As the servos were attached to the wings, they were tested using a simple servo movement sketch to ensure both that the wings moved in the right direction (away from the intended user) and that a pair along the wing would move in sync. Once all servos were installed, we ensured they could be activated and deactivated with button presses before assembling to the frame.  

Issues that came up during code testing were mainly to do with button responsiveness. Even when wired properly, both buttons appeared to not register response or lag when turning off the servo or RGB strip. After re-working the order of checking for buttons within loop(), we introduced an interrupt to the servo button pin which prioritised checking the state of the servos when the button was pressed. This reduced the severity of the issue, but there is still a short delay between either button press and actual stopping of the RGB strip and/or servo. 

​ 

Possible Improvements

Hardware improvements
  • The RGB strip would go around the entire wing.  
  • Customisable pendant: buttons can be changed so colours fit the character/scene better, further blending the pendant into the costume. 
Coding improvements
  • Different light sequences could be programmed and used. For example, different patterns such as blinking or running, and colours could be cycled. There could also be the option to adjust the brightness of the lights. 
  • Fluttering could have a speed adjustment feature – allows for more dramatic effects on stage. 
  • Allow to change the colour on the led strip with the potentiometer without turning on the lights as well.

Group members

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

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 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 8: Lights, Timer, Action!

Introduction

This project is a game intended to entertain users while also testing their reactions. The game measures the user’s reactions over the course of four rounds before creating an averaged result to provide the user with. The game was designed with an emphasis on fun rather than to test, and can be played by teenagers and adults.

Read more “Group 8: Lights, Timer, Action!”

VIOLED GROUP 7

viologo

By Alara, Ideen, Martin, and Frank

Group 7

Phase One: Ideation and Planning

Brief:

We were asked to design a violin based on similar principles using components such as linear potentiometers and possibly amplifiers but also to take it a step further to interact with the user and provide feedback on the quality of the performance through simple interfaces.

Read more “VIOLED GROUP 7”

Group 1: How Fast Is Your Reaction?

 

finishedbreadboard

We were tasked with creating a game that would test a user’s reaction speed. In order to do this, we implemented a game that resembles a Bop-It, which requires a user to complete one of a set number of tasks randomly within a given time constraint. Our game starts the user off with three lives, on the first of three levels. Based on how quickly the user is able to progress through all three levels without missing any components, their final ‘score’ (which will be displayed using an RGB light) will be either Green, Yellow, or Red.
Read more “Group 1: How Fast Is Your Reaction?”

Group 6: Your Own Loving Teddy Bear

img_3548

“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 the 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 messaged and red eyes! Remember, you do not need to use a real Teddy Bear but you can use other prototyping options.”

Read more “Group 6: Your Own Loving Teddy Bear”

Reaction Times Game: Group 4

logo2

Project 3

How Fast is your Reaction? Interactive Game Design
Having quick reactions are great indicators of your alertness level and in certain
cases to the level of activity and logical organisation within your cognitive thinking.
Reaction testing games have been quite popular for decades and the secret behind
their success is their simple yet effective user-interface design which has been
improving and progressing throughout the years. You are asked to design an Arduino
based circuit that tests the user’s reaction speed and accuracy through various
interfaces such as LED lights, buzzers, etc. Keep in mind the principles of interactive
design and also the requirements of effective user interface when producing your
solution. Read more “Reaction Times Game: Group 4”