Jingyi Sun Week 14: Final Project

Download code here: [LINK]

Video: (disclaimer: for the purpose of this video, and to show everything clearer, I made the background black consistently)

For my final project, I am creating a light/lamp controlled by a processing sketch via bluetooth communication.

My original idea was to create a processing sketch where users can input three numbers (rgb values) to change the color of the rgb leds, but I received feedback from Scott and classmates encouraged me to think carefully about the way I wanted the user to interact with the lamp.


For my first iteration I used very basic sliders, where three lines were tracks and three small squares were the toggle for the slider, and the lamp color would be changed every time the user released the mouse. I consulted this instructable: [LINK]. However, during user testing, it seemed that this was not an organic way to change the color, nor was the interface intuitive enough upon first interaction. It was easy to use once you realized how to move around, but many users either expected a fluid change, or didn’t know what the interface was at all.


I then moved to controlp5, which is a library that helps you create controls with processing. I used their built-in sliders, changing the background and foreground to reflect the rgb value that the slider would be changing, as well as changing the background of the sketch to reflect the combined/mixed effect fluidly. I feel like this is a better designed interface that would allow more intuitive interaction.


For the physical component, I used three well-sanded rgb leds attached to an arduino with a bluetooth module. This was relatively straightforward, and the bluetooth connection was reliable and stable. Once I was sure that the circuit worked, I moved it to a perf board for a cleaner and more compact circuit, and used an external battery to power the arduino.



I also worked on the exterior shape of the lamp by first experimenting with paper, but the paper was too thick to let the light shine through. I then used white acrylic to create a exterior shape for the light. I tested the design with cardboard, and made small adjustments (e.g. size of the shape, size and placement for the small tabs used to attach the panels) and made a couple of prototypes before cutting the shape in white acrylic.


During testing it was clear to see that there was a discrepancy in the color mixed on the screen and the color of the led. I didn’t really think this was an issue that could be fixed (like when different computer screens display the same colors slightly differently), but then Scott introduced “gamma correction”  in class, which helps color correct the visuals of the LEDS to what our eyes would expect them to look like.

Link to article: https://learn.adafruit.com/led-tricks-gamma-correction/the-issue

slightly better calibrated lights:


Week 13: Final Project Progress (Fitzgerald)

Group: Tisa & Robert

For this week’s assignment, Robert and I worked on the basic physical system of connecting the Arduino to both and LED and a button, and then on the other side connecting it to the Twitter account. Since we have already started working this during the Friday’s recitation, the amount of work we had to do during the weekend was not very overwhelming.

During the Friday’s recitation, we have started to test our basic concept of having a marshmallow gun/a small ball which will hit a specific bull’s eye image which will rise randomly from the board to which it is attached to. We would use the standard-looking bull’s eye, similar to the ones used in the theme parks (see below).


The board would be the size of our Network Everything classroom desks so that the bulls eyes would not be very squeezed, and easier to target. The material of the board would be wood because it is very stable and will not allow the bulls eyes to move around when taken down by the user. The motors attached to each of the bulls eye would move randomly, so the main point is that the user does not know which of the bulls eyes will rise at which time. This will also increase the intensity of the game itself. Below is the picture of how it looked like.


The first row represents testing of the bull’s eye size, in relation to which size will be the easiest to hit by the user.  We have discovered that the 3rd circle in the first row works the best, so we have made the second row of bullseye circles to test how that would work as well. We have also decided to introduce 5 circles, which will make the game more intense and dynamic for the user to play.

The Arduino work that we did during the class last week was the following: we used three different LED lights with transistors and a button for each of the LED lights. This was more ambitious than using a single LED light and a single button, but we wanted to test it using more LED lights since in our planned project we would also use several bulls eyes. The video recording is below.


After this, we have started to collect our code. Since we already had the Arduino-Twitter API code, as well as Temboo code from the assignment from the previous week, all we had to do is adjust several variables within that code to match what we were doing with Arduino inputs on the physical side. For this assignment, we have used Robert’s already pre-set Twitter account.

Professor Scott recommended that we try out our concept of using the single button and a LED first, before rushing towards using the motors to move the bulls eyes. The work that we did during this weekend was on the Arduino side – we used the code for the single button and a single LED to work with each other. When the button would be pressed, a LED would turn on and the Arduino would send a tweet to the Twitter account.

The problem that we came across was that if the button was pressed right after each other (and a LED would light up), the tweets would not be posted immediately. That is something that we did not take into account when planning this game because we expected that the user would be able to hit different bullseyes immediately right after each other, and the updated score tweets would be posted. Thus, regarding this problem, we need to increase the speed in which Arduino communicates with Twitter.

//LED PIN and Button VALUES

int ledPin1 = 4;
int buttonPin1 = 7;

int ledPin2 = 5;
int buttonPin2 = 6;

//int ledPin3 = 7;
//int buttonPin3 = 8;

int score = 0;
int gameLength = 8;


#include <SPI.h>
#include <WiFi101.h>
#include <Temboo.h>

int calls = 1;   // Execution count, so this doesn't run forever
int maxCalls = 10;   // Maximum number of times the Choreo should be executed

WiFiClient client;
int status = WL_IDLE_STATUS;

#define TEMBOO_ACCOUNT "robertp"  // Your Temboo account name 
#define TEMBOO_APP_KEY_NAME "myFirstApp"  // Your Temboo app key name
#define TEMBOO_APP_KEY "aLoLsqjPQQ5fFlgks7s8pXN11dBVegIv"  // Your Temboo app key

#define WPA_PASSWORD "Vlc5k$zf"

void setup()

  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while (true);

  // attempt to connect to WiFi network:
  while (status != WL_CONNECTED) {
    Serial.print("Attempting to connect to SSID: ");
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:
    status = WiFi.begin(WIFI_SSID, WPA_PASSWORD);

    // wait 10 seconds for connection:
  Serial.println("Connected to wifi");

  pinMode(ledPin1, OUTPUT);
  pinMode(buttonPin1, INPUT);
  pinMode(ledPin2, OUTPUT);
  pinMode(buttonPin2, INPUT);
  //pinMode(ledPin3, OUTPUT);
  //pinMode(buttonPin3, INPUT);

void loop()
  int x = 0;
  while (x < gameLength) {
    int randNumber = random(2);
    if (randNumber == 0) {
      digitalWrite(ledPin1, HIGH);
      if (digitalRead(buttonPin1) == 1) {
      digitalWrite(ledPin1, LOW);
    else  if (randNumber == 1) {
      digitalWrite(ledPin2, HIGH);
      if (digitalRead(buttonPin2) == 1) {
      digitalWrite(ledPin2, LOW);
    Serial.println("Your current score is : " + String(score));
  score = 0;

void sendTweet() {
  Serial.println("Running StatusesUpdate - Run #" + String(calls++));

  TembooChoreo StatusesUpdateChoreo(client);

  // Invoke the Temboo client

  // Set Temboo account credentials

  // Set Choreo inputs
  String StatusUpdateValue = String(score) + " is the new high score";
  StatusesUpdateChoreo.addInput("StatusUpdate", StatusUpdateValue);
  String ConsumerKeyValue = "GCgsedFeeDPjGcXX6w7omleM4";
  StatusesUpdateChoreo.addInput("ConsumerKey", ConsumerKeyValue);
  String AccessTokenValue = "861505638966243330-NnNA8w7IiMYkKzlGhJv1vxpK2F3CAcj";
  StatusesUpdateChoreo.addInput("AccessToken", AccessTokenValue);
  String ConsumerSecretValue = "8ZkAB0IDCwPCg0w6gADnCzCRYufI4n7hSJkufS3UBCRa45vdPI";
  StatusesUpdateChoreo.addInput("ConsumerSecret", ConsumerSecretValue);
  String AccessTokenSecretValue = "sTCuHtTozozZvYVX3oFRIuF4tfLUOEXRpe1waaKU2R3AJ";
  StatusesUpdateChoreo.addInput("AccessTokenSecret", AccessTokenSecretValue);

  // Identify the Choreo to run

  // Run the Choreo; when results are available, print them to serial

  while (StatusesUpdateChoreo.available()) {
    char c = StatusesUpdateChoreo.read();


  while ( true );
    Serial.println("RESET THE ARDUINO TO PLAY AGAINNNNNNNN");//An empty loop.

The Alert Bracelet Tuesday Updates (Gabriela and Sidra)

We started off by creating a Temboo for Gmail API. To do this, we had to verify one of ours Gmail accounts to get the verification key (which required activating a foreign number a the Chinses one did work for some reason). Then, we set the title of the alert email to “HELP ALERT” and the body to “I need help. Please, come as soon as possible.” We decided that the email is going to be sentwhen the button is pressed from “Grandma’s” account: nefron17@gmail.com to Sidra’s account (“close relative”). The next step included generating the code and connecting MRK1000. Initially, we had problems connecting MKR1000. It turned out the the one we checked out was broken. Thus, we managed to obtain another MKR1000 which worked just fine. The second problem was the the working MKR100 was not connecting to the WIFI because we did not include the WIFI password in the code. At that point we tested our code without having connected the button yet. As we input a value into the Serial monitor, the shown below email was sent to Sidra’s account:

gmail sent

After a minute, the HELP ALERT email showed up in Sidra’s inbox:

gmail inbox


However, later on we encountered some problems. Our email was sent out once and we could not make it send again. So, to troubleshoot, we decided to set up a entirely new gmail account with a Polish Phone number (Gmail does not accept Chinese phone numbers for authentication purposes, which makes it really difficult). So we set an account called grandmaold@gmail.com and set the message content to “Help!” We generated new Temboo code and everything started workings as intended. The following video shows that once a button is pressed (we added a pushbutton), Sidra receives an email from grandmaold@gmail.com:

If the button is pressed multiple times, Sidra receives multiple emails:


Finally, this is our final working code:

(Week 12) Final project proposal, by Peter and Diana

Group member: Peter, Diana

Instrcutor: Scott

Here is the link to the slides:


For our final project, we plan to make a system that keeps track of the annoying things that disappear a lot, such as keys, chargers, and NYU id cards.

The system would utilise ethernet shields, Xbees, and so on, and serve a website for the user to control the missing stuff blink or buzz when they are hiding away from him.

For the details, see the slides~


NE: Final Project Proposal – TA

Link to Google Slides: < https://docs.google.com/presentation/d/1jnxhuQAXgt03eM-bGHT75h3c3YT0sd4-2YuoY9Rhnlg/edit?usp=sharing >

For my project, I would like to track light levels of the places I go to.  When my eyes feel strained and I get a headache (which happens frustratingly often), I suspect that it is because I look at screens too long, or spend too much time in artificial lighting.  By tracking light levels and comparing them to physical logs I keep, I may be able to test my hypothesis.

This project will involve a sensor apparatus, a logger, an online data storage system, and a data visualization system.  See the Google Slides for details.

(Week 11)Network Everything – Final inspiration, by Peter

After searching online, I found this project very interesting: A Wireless Hotspot that broadcasts the weather as its network name.

And here is the link: http://www.coin-operated.com/2015/02/01/wssid-2015/

Project description:

“WSSID” is a hacked wireless router that collects and broadcasts live weather data from it’s local environment  in the form of dynamically changing SSID names. The project examines the use of wireless networks on the environment and how we are always seemingly in range of these signals without explicitly asking to be. Operating similarly to the way that weather is beyond our direct control, “WSSID” shows us how permeating these networks have become by relaying direct environmental data about the locations in which they are housed.

So here is how this project looks like:



Although this project is basically useless given the existence of all kinds of weather broadcast apps around, it is very interesting. For me, I think it would be even more interesting if we add some other inputs to it. As we can see above, to have a comprehensive weather report with this project would be bothersome and expensive, since you will need multiple routers. One change we might be able to do is add another physical input to it so that a user can decide what he or she wants to see. For instance, the physical input could be a switch. When the switch turns to temperature, the router changes its network name to the information about temperature. In this way, we only need one router to get comprehensive whether reports.

Interesting Arduino Project-Robert Prast

The project I found most interesting is a project that takes current size and timing between waves, this data is then translted into different low frequency sound waves. These sound waves then shake a bowl that is sitting atop a speaker , which in turn will create different patters in the bowl. From there, the patterns are then parsed into software into an image which is then cast on the wall.
The reason I found this interesting is because it takes something so remote and not relevant to everyday life and shapes it into a artistic piece. Obviously we know that the ocean is an every changing entity, though it seems more and more irrelevant as technology abstracts this data into just numbers and graphs.


Inspiring networked alarm clock – Elaine


This is a classic Arduino example, and it’s like a mini Goldberg machine. So according to this article, the inventor built connections between the clock, the Arduino microcontroller and a relay, housed in a tin, so that when the alarm clock goes off, it triggers a motor. The motor, which is connected to the arm, sends it whirling around…

I like this simply because my phone’s alarm never wake me up, and this project 1) makes me laugh so hard; 2) gives a promising solution for waking me up.

What I like, Olesia

I still can’t get over https://twitter.com/internetofshit. I can’t really pinpoint one project. All of them are hilarious which  I like very much. I’m not sure they are incorporating microcontrollers but I wish I could create something like that for the final. Something stupid and funny. Hopefully, I can come up with something.

Inspiration for Final Project

I particularly like art that takes up physical space(other than just on a wall). I found this piece of art that scrapes public birth and death records and visualizes them on two television screens. It is called Untitled Film II. Here is a link to it.