Finalized Concept
The finalized concept of my project is 3D Etch-a-Sketch, with dimension being 31 x 31 x 31.
Breakdown: Arduino & Circuit
-
-
- Direct Input (+processed): 8 potentiometers and 2 switches (buttons)
- 3 potentiometers: x, y, z coordinate of the drawing block (0-30)
- 3 potentiometers: R, G, B value of the drawing block (0-255)
- 2 potentiometers: x, y angle of rotation of entire drawing (0-360)
- 1 switch: choose among displayAll/disableIndicators/disableAll
- displayAll: display 3D space indicators and block outline
- disableIndicators: disable 3D space indicators
- disableAll: disable 3D space indicators and block outline
- 1 switch: toggle eraser mode & long press to reset all
- Build: normal drawing block
- Remove: invisible drawing block (erase blocks)
- Reset Warning: press 3 seconds to enter, warn that if pressing is continued, entire drawing will be removed
- Reset: continued press (total 6 seconds) to enter, clear all blocks
- Direct Output: None. p5.js will take this part.
- Serial Input: reset
- reset: receive value 1 when the blocks are cleared. Resets some variables, including display mode and eraser mode.
- Serial Output: All values generated by direct input
- x, y, z coordinate of the drawing block (0-30)
- R, G, B value of the drawing block (0-255)
- x, y angle of rotation of entire drawing (0-360)
- displayAll/disableIndicators/disableAll (0-2)
- build/remove/reset warning/reset (0-3)
- Direct Input (+processed): 8 potentiometers and 2 switches (buttons)
-
Breakdown: P5.js
-
-
- Direct Input: serial communication setup & test inputs
- Click canvas to trigger setUpSerial()
- Basic keyboard controls for testing.
- Will likely be disabled in final product
- Direct Output: displaying of 3D Etch-a-Sketch
- (many are already described in Breakdown: Arduino & Circuit)
- On setup, a 31 x 31 x 31 block space will be created
- Convert x, y, z values into 3D space coordinates
- Convert R, G, B values into a color of the drawing block
- Convert px, py values into a 3D perspective (view angle)
- displayAll/disableIndicators/disableAll
- toggle eraser mode & reset warning/reset all
- Serial Input: All values coming from Arduino
- (already described in Breakdown: Arduino & Circuit)
- x, y, z
- R, G, B
- px, py
- displayAccessoryMode
- eraserMode
- Serial Output: reset
- (already described in Breakdown: Arduino & Circuit)
- Direct Input: serial communication setup & test inputs
-
Summary
Arduino will take care of all inputs. P5.js will take care of all outputs. All interactions have one-to-one direct outcomes.
Progress (Dec 3, 2022): p5.js
Since the sketch will not work without Arduino side being set up, the sketch will be linked: https://editor.p5js.org/ob2sd/sketches/2C81Ie2p_
As of now, the test mode can be enabled with the below modification:
function draw() { if (!serialActive) { // serialActive --> !serialActive ... } }
Use wheel click or right click + Esc to interact with the canvas. Left click will trigger setUpSerial(). Use arrow keys to change perspective (rotation angle of entire drawing). Use numpad (123 789) to control x, y, z coordinate of the drawing block.
Progress (Dec 6, 2022): p5.js
Test mode can be enabled with the following modification:
let debug = true;
Use Ctrl + F and find variable debug to see which interactions are implemented in debug mode.
The physical controller is in the process of being built.
Group
I will be likely working as solo, although I am open to anyone who can help me with the physical side of the project.