Difference between revisions of "Students/Julian Santos III"

From Robert-Depot
Jump to: navigation, search
(Video and Images)
Line 55: Line 55:
 
http://scratch.mit.edu/projects/Janussaint/937832
 
http://scratch.mit.edu/projects/Janussaint/937832
  
===Video and Images===
+
===Video and Image Documentation===
 +
 
 +
Video presentation soon..
 
<gallery>
 
<gallery>
 
Image:Controller1.jpg|Controller housing
 
Image:Controller1.jpg|Controller housing
Line 61: Line 63:
 
Image:JjsantosControllerinnards.jpg|Innard of the controller- Arduino, breadboard and wiring
 
Image:JjsantosControllerinnards.jpg|Innard of the controller- Arduino, breadboard and wiring
 
</gallery>
 
</gallery>
 
Video soon..
 
  
 
===Function Diagram and Schematic===
 
===Function Diagram and Schematic===

Revision as of 21:52, 18 March 2010

Julian Jay-Jay Santos III [1]

About Me

UCSD & Electronics

I am a Super Senior at UCSD with a major in Visual Arts Media with an Emphasis in Computing. The main reason I'm taking Electronic Technologies for Arts is because it fulfills major requirements plus my world is driven by anything electric and to understand it better is like understanding my blood. I have some electronics experience in soldering, wiring and basically taking things apart to see how they work or hacking and customizing the parts to my liking.

Visual Arts

I am colorblind which is ironic because I'm also a visual artist, graphic designer, videographer, illustrator, photographer and all things visual. Ive been working as a Graphic Designer for http://VMIX.com (an internet video platform company) and I also hold an Associates Degree from Southwestern College and sometimes do freelance and personal work under the moniker JS3 for designing, videography and custom DIY projects.

Life Documenting

I'm never without my Casio FC100 still/hd video/slow motion digital camera, G1 Google Phone and Moleskine sketchbooks at hand I love to document my life. I like to take photos of my major meals food and other weird happenstances on my blog and website http://byJS3.com I'm also big on everything internet- social networks, blogging, online video, basically anything that has an RSS feed that can be connected and shared with the world.

Field Research

Midterm Project

Super Mario Jumping Shoes

CIMG2303%20%28Small%29.JPG

From having an Atari 2600 in my early youth (!) I've become an avid a video gamer all my life. I have always identified with the creativity and problem solving aspects of gaming and have found much of myself with the video game characters. One such character is the popular Nintendo hero of the Super Mario games Mario, who was originally named JumpMan when he first appeared in the video game Donkey Kong. This was probably because he has a distinctive sound he makes when he jumps. To further my love of the character I would like to blend the lines of videogame and reality, and thus I would like to create Super Mario Jumping Shoes.

To make Super Mario Jumping Shoes I will put a pressure activated switch on the insole of the shoe which will be connected to a Super Mario sound toy that makes the jumping sound when pressed. I will have to dismantle the toy and connect a switch under an insole that is only activated when I jump as opposed to walking which would make less pressure on the button. This will require some circuit bending on my part. I could probably accomplish this with extra padding or use a normally closed switch that activates the circuit when my foot leaves my shoe's sole when I jump.

super_mario_toy_1.jpg CIMG2306%20%28Small%29.JPG CIMG2291%20%28Small%29.JPG CIMG2258%20%28Small%29.JPG CIMG2252%20%28Small%29.JPG CIMG2251%20%28Small%29.JPG CIMG2248%20%28Small%29.JPG

Final Project

Jjsantos-screencontrllr.jpg

Arduino Scratch Game Controller

As someone who has a deep affinity with classic videogames, I have always wanted to create and understand the media more. From analog joysticks to the newly developed accelerometer controllers, I am intrigued by the ways a digital object onscreen could be controlled by a physical analog device in the real world. To further this interest, I wanted to recreate a classic videogame as well as recreate a gamepad controller using an Arduino Microcontroller.

After further research on how this could be best accomplished, I stumbled upon Scratch [2] a unique programming platform that makes it easy to create rough sketches of interactive digital media due to its real time condition testing and straight forward approach to program design. After some time being familiar with Scratch, I decided that I was going to recreate a classic videogame while using what I have learned from Arduino programming to make it function as a gamepad.

To help with this transition, I found a simplified controller board specifically made for use with Scratch called a Picoboard [3] which has sensors and functions much like an Arduino. In order to use the Arduino with Scratch I reappropriated code from a Scratch-board simulation site [4] which allows the Arduino to be used in the same way as a Picoboard.

On the Arduino, I substituted a potentiometer and a push-button switch to respectively replace the functions on the Picoboard. To complete the controller I wired and soldered all the parts into a plastic housing. I chose to remake the classic topdown shooting videogame Centipede to accommodate the controller. The game is also perfect for using the potentiometer as its dial doesnt rotate a full 360 degrees and the player's controlled vessel in Centipede only moves left and right in a limited enclosed play area (as opposed to a game where the player's controlled vessel has a free full range of motion where at least a four-point setup is needed).

I found a Scratch project example of Centipede and reconfigured the language to be used by the Arduino Controller. A roadbump that I found from translating the Arduino's controller to the Scratch game was that the potentiometer read as 0-100, but this was solved creating variables that would set its orientation based on the sensor value.

The final result can be found in this link (but can only be playable using the Arduino Controller). http://scratch.mit.edu/projects/Janussaint/937832

Video and Image Documentation

Video presentation soon..

Function Diagram and Schematic

JjsantosDiagram1.jpg Schematic1.jpg

Arduino Code

/* 
 ScratchBoard compatible program
 
 */

// digital input pin
#define BUTTON 2 //normally open push button switch

// analog input pin
#define SLIDER 0 //connected to a 100k pontentiometer
#define LIGHT  1 // for using light sensors
#define SOUND  2 // for a mic
#define R_A 3 
#define R_B 4
#define R_C 5
#define R_D 5 // 3-5 analog inputs

#define FIRMWAEW_ID 4  // ScratchBoard 1.1 Firmware ID

#define LED_PIN 13  // response lamp (digital pin 13 is on board LED)

const byte req_scratchboard = 1;  // request messge from Scratch
const byte mask_scratcharduino = 240;  // request mask of Scratch+Ardunio
const byte ch_r_D = 0;
const byte ch_r_C = 1;
const byte ch_r_B = 2;
const byte ch_button = 3;
const byte ch_r_A = 4;
const byte ch_light = 5;
const byte ch_sound = 6;
const byte ch_slider = 7;
const byte ch_firmware = 15;

int sensorValue = 0;  // sensor value to send

byte inByte = 0;  // incoming serial byte

void setup()
{
  // start serial port at 9600 bps:
  Serial.begin(38400);
  pinMode(BUTTON, INPUT);   // digital sensor is on digital pin 2

  // initialize the digital pin as an output:
  pinMode(LED_PIN, OUTPUT);     
  //digitalWrite(LED_PIN, HIGH);   // set the LED on

}

void loop()
{
  // if we get a valid byte, read analog ins:
  if (Serial.available() > 0) {
    // get incoming byte:
    inByte = Serial.read();
    if (inByte == req_scratchboard) {
      digitalWrite(LED_PIN, HIGH);   // set the LED on

      sendValue(ch_firmware, FIRMWAEW_ID);
      delay(10);

      // analog read range from 0 to 1023
      // delay 10ms to let the ADC recover:

      sensorValue = analogRead(R_D);
      sendValue(ch_r_D, sensorValue);
      delay(10);

      sensorValue = analogRead(R_C);
      sendValue(ch_r_C, sensorValue);
      delay(10);

      sensorValue = analogRead(R_B);
      sendValue(ch_r_B, sensorValue);
      delay(10);

      // read  switch, map it to 0 or 1023L
      sensorValue = map(digitalRead(BUTTON), 0, 1, 0, 1023);  
      sendValue(ch_button, sensorValue);

      sensorValue = analogRead(R_A);
      sendValue(ch_r_A, sensorValue);
      delay(10);

      sensorValue = analogRead(LIGHT);
      sendValue(ch_light, sensorValue);
      delay(10);

      sensorValue = analogRead(SOUND);
      sendValue(ch_sound, sensorValue);
      delay(10);

      sensorValue = analogRead(SLIDER);
      sendValue(ch_slider, sensorValue);
      delay(10);

      digitalWrite(LED_PIN, LOW);    // set the LED off
    }
  }
}

void sendValue(byte channel, int value) {
  byte high = 0;  // high byte to send
  byte low = 0;  // low byte to send
  high = (1 << 7) | (channel << 3) | (value >> 7);
  low =  (0xff >> 1) & value;
  Serial.write(high);
  Serial.write(low);
}