If you are a current student, please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.csail.mit.edu) to authenticate, and then you will be redirected back to this page.
1) Overview
In this Design Exercise, you will use the IMU's accelerometer integrated with the rolling-ball infrastructure from Week 02's regular exercises as well as the IMU integration of Week 03's regular exercises to create an etch-a-sketch which allows POSTING of drawings. Essentially we want you to create a drawing by logging/remembering/displaying your rolling ball's position as you roll it around the screen using your IMU.
2) Specifications
- The system must be capable of:
- Creating drawings using a 4-pixel wide "ball" serving as a drawing tip.
- Recording the drawings at a time-resolution you deem fit (do you remember every point position or every other, etc...?)
- Completely erasing and starting over at any point during a drawing sequence
- POSTing the drawing to the drawing application URL at any point during the draw.
- Retrieving a specific drawing from the server using a GET request and then displaying that drawing
- The system must use the 6.08 infrastructure for carrying out and analyzing its HTTP request
- It can use at most two buttons (how you use them is up to you)
The drawing should be stored as x-y coordinates using commas to separate the x,y value and ampersands (&) to separate the coordinates like the following: Say your drawing was composed of the ball being in three locations :(0,4), (15,15), and (14,11). You'd want to send that up to the server in the following format:
0,4&15,15&14,11
A web application located at http://iesc-s3.mit.edu/esp32test/etchsketch is configured such that when you send a properly formatted POST (which is json formatted...look it up):
POST /sandbox/etchsketch HTTP/1.1
Host: 608dev.net
Content-Type: application/json
Content-Length: 47
{"user":"jodalyst","drawing":"0,4&15,15&14,11"}
it will store the drawing data using a unique identifying number which it returns to you in the body of the POST response in the format:
drawing ID:151917766919
where 151917766919
or whatever number you get should be remembered. If you do a GET request with a query argument for the drawing ID then, you can recover your drawing from the database:
GET /sandbox/etchsketch?drawing_id=151917767559 HTTP/1.1
Host: 608dev.net
which will return:
drawing~0,4&15,15&14,11
The drawing POSTed can be no longer that 2000 characters.
- You must submit a Design Exercise Write-up. Use (the template file provided here). Read this file since it has some instructions about what to include.
- You must upload all of your code that you used in your design. Failure to upload code will result in significant point loss. This includes if you just forgot. Screenshots of your file's last modified date in My Computer are not evidence that the file has not been changed. They must be uploaded.
- You must upload your video to YouTube or any other site that has a timestamp associated with it and is accessible by the staff. Do not upload it to a private video sharing thing where the staff can't see it. Youtube, Google Drive, TikTok (shudder) will all work. Just test the link. Enter the link in the third box below.
Error on line 2 of Python tag (line 142 of source): kerberos = cs_user_info['username'] KeyError: 'username'