John Mars – Physical Computing Studio https://courses.ideate.cmu.edu/48-390/s2016 CMU | Spring 2016 | 48-390 Sun, 02 Oct 2016 15:29:26 +0000 en-US hourly 1 https://wordpress.org/?v=4.5.31 Project 03 — Cardboard https://courses.ideate.cmu.edu/48-390/s2016/2016/03/01/project-03-cardboard/ https://courses.ideate.cmu.edu/48-390/s2016/2016/03/01/project-03-cardboard/#respond Tue, 01 Mar 2016 15:35:02 +0000 http://courses.ideate.cmu.edu/physcomp/s16/48-390/?p=365 Code, demos, and project descriptions are available for this project at the Github Repo: https://github.com/marsman12019/IDeATePhysCompProject03-Cardboard

]]>
https://courses.ideate.cmu.edu/48-390/s2016/2016/03/01/project-03-cardboard/feed/ 0
PROJECT 2 – Sensor [Documentation] https://courses.ideate.cmu.edu/48-390/s2016/2016/02/23/project-2-sensor-documentation/ https://courses.ideate.cmu.edu/48-390/s2016/2016/02/23/project-2-sensor-documentation/#respond Tue, 23 Feb 2016 15:14:06 +0000 http://courses.ideate.cmu.edu/physcomp/s16/48-390/?p=279 Continue Reading →]]> OBJECTIVE

Make a blog post documenting your project.

DELIVERABLES

  • A 30-60 second video of your project in action
  • A (well-linked) writeup of your design process, including:
    • The genesis of your idea
    • The technologies used to make it happen
    • Diagrams, photos, and sketches of your progress along the way
    • Link to a Github repo or gist containing your code
    • References to any external libraries or inspiration
    • Your thoughts about what you’ve learned, and where this project could go in the future
  • Ensure the blog post is correctly titled and categorized
]]>
https://courses.ideate.cmu.edu/48-390/s2016/2016/02/23/project-2-sensor-documentation/feed/ 0
Links from Mini Lecture on Mechanics https://courses.ideate.cmu.edu/48-390/s2016/2016/01/21/links-from-mini-lecture-on-mechanics/ https://courses.ideate.cmu.edu/48-390/s2016/2016/01/21/links-from-mini-lecture-on-mechanics/#respond Thu, 21 Jan 2016 18:16:56 +0000 http://courses.ideate.cmu.edu/physcomp/s16/48-390/?p=27
  • Hoberman Sphere
  • Computational Design of Mechanical Characters
  • Mechanical Movements
  • Strandbeests
  • Pen Plotters [I | II | III]
  • Rapid Prototyping Design and Control of Tensegrity Soft Robot for Locomotion
  • Omnidirectional Wheels
  • Vertigo
  • ]]>
    https://courses.ideate.cmu.edu/48-390/s2016/2016/01/21/links-from-mini-lecture-on-mechanics/feed/ 0
    OSC Example https://courses.ideate.cmu.edu/48-390/s2016/2016/01/21/osc-example/ https://courses.ideate.cmu.edu/48-390/s2016/2016/01/21/osc-example/#respond Thu, 21 Jan 2016 17:55:11 +0000 http://courses.ideate.cmu.edu/physcomp/s16/48-390/?p=21 Here’s the example I shared in class for using OSC with the Photons.

    It’s also available as a Gist on Github.

    #include "simple-OSC/simple-OSC.h"
    
    // create OSC object
    UDP osc;
    
    // set IP addresses and ports for I/O
    IPAddress outIp(128, 237, 246, 8);
    unsigned int outPort = 9000;
    unsigned int inPort = 3000;
    
    // creat named variables for pins
    int leftMotorPin = D1;
    int rightMotorPin = D0;
    
    int ledPin = D7;
    
    
    // runs once at the beginning of the program
    void setup() {
    
    	// start serial & OSC
    	Serial.begin(115200);
    	osc.begin(inPort);
    
    	pinMode(leftMotorPin, OUTPUT);
    	pinMode(rightMotorPin, OUTPUT);
    	pinMode(ledPin, OUTPUT);
    
    	// You can view Serial.print() commands sent from the Photon via your computer's console (while it's plugged in to the computer).
    	// Do `ls /dev/tty.usb*` in terminal to find the address of the Photon,
    	// then do `screen ADDRESS BAUD` to make a serial monitor.
    	// For example, if my Photon is "/dev/tty.usbmodem331", I'd do 'screen /dev/tty.usbmodem331 115200'.
    	
    	// while waiting for connection to be set up
    	while (!WiFi.ready()) {
    		// wait and print to console
    		delay(500);
    		Serial.print(".");
    	}
    	// print to console when connection is started
    	Serial.println("");
    	Serial.println("WiFi connected");
    	// get Photon's IP:PORT and print it to console
    	IPAddress ip = WiFi.localIP();
    	Serial.print(F("ip : ")); 
    	Serial.print(ip);
    	Serial.print(F(" : ")); 
    	Serial.println(inPort);
    }
    
    
    // continuously runs throughout the life of the program, after setup()
    void loop() {
    	
    
    	// RECEIVE ===
    
    	// create message object
    	OSCMessage inMessage;
    
    	// if the incoming OSC packet is larger than 0 bytes
    	int size = 0;
    	size = osc.parsePacket();
    	if (size > 0) {
    		
    		// copy each byte from the incoming packet to the message object
    		while (size > 0) {
    			inMessage.fill(osc.read());
    			size--;
    		}
    		
    		// if the message can be parsed
    		if (inMessage.parse()) {
    				
    				Serial.println("Message Received");
    
    			// route it to a callback function
    			inMessage.route("/A", leftCallback);
    			inMessage.route("/B", rightCallback);
    		}
    	}
    	
    
    	// SEND ===
    
    	// To test sending messages, you can use `nc -ul PORT` in terminal to listen to incoming messages on localhost.
    	// For example, if outIp is my computer's IP address (128.237.246.8), and outPort is the port I'm sending to (9000),
    	// then I'd run `nc -ul 9000` in terminal, and send a message from the Photon using the following example.
    	//
    	// For TouchOSC, you'd want to send the appropriate route to your mobile device's IP. Follow instructions [here](http://hexler.net/docs/touchosc)
    
    	// create an outgoing message object
    	OSCMessage outMessage("/sensor");
    
    	// add parameters to the object
    	outMessage.addString("test");
    	outMessage.addFloat(-3.14);
    	outMessage.addInt(-1);
    
    	// send the object
    	outMessage.send(osc, outIp, outPort);
    }
    
    
    // callbacks are run asynchronously from the main loop()
    void leftCallback(OSCMessage &inMessage) {
    		Serial.println("LEFT CALLBACK");
    		
    		if (inMessage.getInt(0) == 0) {
    			Serial.println("LEFT OFF");
    			digitalWrite(leftMotorPin, LOW);
    			digitalWrite(ledPin, LOW);
    		} else {
    			Serial.println("LEFT ON");
    			digitalWrite(leftMotorPin, HIGH);
    			digitalWrite(ledPin, HIGH);
    		}
    
    }
    
    void rightCallback(OSCMessage &inMessage) {
    		Serial.println("RIGHT CALLBACK");
    		Serial.println(inMessage.getInt(0));
    
    		if (inMessage.getInt(0) == 0) {
    			Serial.println("RIGHT OFF");
    			digitalWrite(rightMotorPin, LOW);
    			digitalWrite(ledPin, LOW);
    		} else {
    			Serial.println("RIGHT ON");
    			digitalWrite(rightMotorPin, HIGH);
    			digitalWrite(ledPin, HIGH);
    		}
    
    }

    ]]>
    https://courses.ideate.cmu.edu/48-390/s2016/2016/01/21/osc-example/feed/ 0
    Looking Outwards https://courses.ideate.cmu.edu/48-390/s2016/2016/01/19/looking-outwards/ https://courses.ideate.cmu.edu/48-390/s2016/2016/01/19/looking-outwards/#respond Tue, 19 Jan 2016 16:42:23 +0000 http://courses.ideate.cmu.edu/physcomp/s16/48-390/?p=13 Continue Reading →]]> On a number of occasions this semester (approximately once per project), you are going to complete a “looking outwards” assignment, where you search relevant fields for projects related to the current topic.

    You will then make a blog post of your discoveries, following the format below:

    IMAGE:  You will begin your post with an image of your chosen project. Images must be at least 756 pixels wide, and must be linked to the full-size image.

    TEXT: Here you will provide text in the format specified below.

    • EXPLAINED: Explain the project in less than 160 characters.
    • CHOSEN: Why did you choose this project?
    • CRITIQUED: What did the designer do well? What did they do poorly? What would you change?
    • RELATED: Where did the project come from? What informed it, and what does it inform? What is its family tree?

    LINK: Please post a linked URL of the project here.

    VIDEO (OPTIONAL): If there is a youtube or vimeo video, please link embed it here.

    Repeat these steps three times!

    Each post should contain THREE relevant projects. Projects you write about should be projects you’ve newly discovered while doing this research, i.e., projects you haven’t come across before (though feel free to add those to your post beyond the three).

    ]]>
    https://courses.ideate.cmu.edu/48-390/s2016/2016/01/19/looking-outwards/feed/ 0
    PROJECT 1 – Drawbots https://courses.ideate.cmu.edu/48-390/s2016/2016/01/14/project-1-drawbots/ https://courses.ideate.cmu.edu/48-390/s2016/2016/01/14/project-1-drawbots/#respond Thu, 14 Jan 2016 10:30:08 +0000 http://courses.ideate.cmu.edu/physcomp/s16/48-390/?p=10 Continue Reading →]]> OBJECTIVE

    Make a wheeled robot that completes a challenge on a whiteboard table. Your team may choose from one of the challenges below:

    Normal Challenge

    • Solve a Maze
      • bonus: make it draw the maze first
    • Draw an algorithmic pattern [S+A]
      • bonus: make a multi-color changer
    • Keep the table clean of marks and debris
      • bonus: do it with CV and an external camera
    • Trace objects placed on the table
      • bonus: color them in when the object is removed

    Hard Challenge

    • Two Sumo Bots [D+J]
      • bonus: make them controlled by a phone/remote control
    • Draw a clock
      • bonus: make it an analog clock
    • Draw a face from a vector image
      • bonus: draw from a photograph/video
    • Draw from your phone
      • bonus: make a website anyone can draw from

    DETAILS

    This is a fast and dirty project which will give you guys the opportunity to program your Photon boards, design physical mechanisms, utilize the tools available in IDeATe, and build with available hardware. We don’t expect these prototypes to be pretty. This project is about the process and the focus should be on functionality and simplicity. You only have a couple of weeks and a lot to learn.

    You will work in teams of 2 (may have one team of 3 if there is an odd number). We will assign groups based on the course survey and discussions in class. Your team will select a robot type from the list above and get cranking. We will provide examples of DC motors, servos, stepper motors, ultrasonic depth sensors, photoresistors, etc.

    Some example projects are listed below for inspiration and instruction (we will add to this list as you guys find more useful examples):

    Projects

    Tutorials

    Commercially Available

    DELIVERABLES

    The final (working) prototype is due Tuesday, January 26th.

    In addition, a blog post including the following is due 1/26, as well:

    • Process documentation: images/drawings
    • Write-up: Abstract/Related Work/Implementation/Discussion
    • 30 second video: shot on tripod/edited
    ]]>
    https://courses.ideate.cmu.edu/48-390/s2016/2016/01/14/project-1-drawbots/feed/ 0
    PROJECT 0 – Hello, World! https://courses.ideate.cmu.edu/48-390/s2016/2016/01/12/project-0-hello-world/ https://courses.ideate.cmu.edu/48-390/s2016/2016/01/12/project-0-hello-world/#respond Tue, 12 Jan 2016 10:30:57 +0000 http://courses.ideate.cmu.edu/physcomp/s16/48-390/?p=6 Continue Reading →]]> OBJECTIVE

    The purpose of this assignment is to ensure all students are familiarized with the PhysComp lab and the primary computational tools used for the duration of the course.

    DELIVERABLES

    1. If you haven’t already, sign up for the Github Education Pack
    2. If you’re new to Git/Github, try these challenges
    3. Install Node.js on your computer, either via a direct download or a package manager.
    4. Test your install by typing npm -v into Terminal. If it responds with a number (like 3.3.12), you’re good to go.
    5. Install the Particle CLI with
      npm install -g particle-cli
    6. You may need to run as sudo if you get install errors.
    7. Use
      particle setup

      to create a new Particle account (or login, if you’ve already made one).
    8. Once you’ve made an account or logged in, press Control-c to exit the prompt. IMPORTANT: Do not continue onto further steps in the wizard.
    9. Plug your Photon into your computer, and when it begins blinking blue, use
      particle serial mac

      to get the Photon’s MAC address. Copy this to your clipboard.
    10. Sign your Photon’s MAC address up on NetReg
      1. Login
      2. Click “Register New Machine”
      3. Under “Select the Network”, select “Legacy Wireless Network”, then continue
      4. Under “Hostname”, type in a unique identifier for your Photon. For example, I called mine MARS-Photon
      5. Under “Hardware Address”, paste your MAC address from the CLI tool
      6. Under “Affiliation” select your university affiliation, then continue
      7. IMPORTANT: Wait at least 30 minutes or so for the network to do its thing. If you’re running into trouble connecting in the next step, wait a little longer. It can sometimes take more than an hour.
    11. Download the Particle App from on your iPhone or Android device, and follow the onboarding procedure to get your Photon up and running. Detailed instructions can be found here.
      1. Be aware that you can’t use CMU-SECURE with the Photon. Everything must be done with CMU. You might want to register your personal computer and phone with CMU as well, to make the setup run a little more smoothly.
    12. Complete the GETTING STARTED tutorial (at least sections 4-7) within the Particle Docs.
    13. Come to class having completed “Make a Motion Detector: Publish and the Dashboard”. You should have the circuit assembled, and the demo code flashed to the Photon (and working). Bonus points for putting your own spin on the demo setup (maybe hook it up to IFTTT, or if you’re working with a partner try “The Buddy System: Publish and Subscribe”).
    ]]>
    https://courses.ideate.cmu.edu/48-390/s2016/2016/01/12/project-0-hello-world/feed/ 0