Lousa mágica & Lousa paramétrica
Tools for drawing with potentiometers (take a look at the GitHub repo!)
Lousa mágica is something like “magic blackboard”, it was the name in Portuguese of the “Etch A Sketch” drawing toy that inspired this project. Then Lousa paramétrica would mean something like “parametric drawing board”.
Lousa mágica video at Sesc 24 de maio - credits: João Adriano Freitas
- Lousa mágica was inititally presented as part of Estúdio Hacker activities at the inauguration of Sesc 24 de Maio, on August 2017 (video above). It used 6 potentiometers for drawing and drawings could be erased by tilting the control box.
It was also possible to post tweets with the drawing content (using a Twitter API library).
On Estúdio Hacker Day (September 7th, 2017), also at Sesc 24 de maio, a workshop was held where the participants set up a version of Lousa mágica with 4 potentiometers in a protoboard.
Setups with 4 potentiometers using a variation of the Lousa mágica software and a new version called Lousa paramétrica with a recursive parametric drawing of a tree were displayed at the Sesc Art Circuit 2018.
Several sketch-a-day project drawings were made to be used with the same setup.
TO DO: Add links to other 'parametric' drawings that can be modified with pots
- Arduino (or similar board) with at least 4 analog pins;
- USB cable to link up the Arduino to the computer;
- 4 to 6 linear 10kΩ potentiometers (type “B”) (you can use 2 or 3 but it’s not as cool);
- Protoboard and jumpers;
- Computer and monitor (or a laptop) running Linux, Mac or Windows. Use a big TV or a projector for bigger impact on guests!
- Optional: button or mercury tilt switch (the computer keyboard may be used instead) and 10kΩ resistor (if it’s a button/switch connected to a pin other than
Download and install the Arduino IDE;
Connect your Arduino/board to your computer, open the Arduino IDE, and in the menu
File > Examples > Firmatalook for the sketch called Firmata All Inputs. Next, select your board’s model in
Tools > Board:, and in
Tools > Port, the USB/serial port the board is connected to. Lastly, click the
➔button to upload the sketch to the board;
- Some Arduino clones need a special USB driver: How to Install CH340 Drivers
- If you use Linux, you might not have permission to access the USB/serial port, that can be corrected by typing
sudo usermod -a -G dialout <your username>in your shell prompt.
Connect each potentiometer to your Arduino/board according to the image:
4.1 Connect the side terminals of each potentiometer to the
4.2 Connect the central terminals to the board’s analog pins:
Optionally, if you chose to use a button/switch to erase the drawing in Lousa mágica, it must be connected to the
Digital 13pin and
If not using the
D13pin, connect the chosen pin terminal to the 10kΩ resistor (so called pull-down resistor) and to the
GNDpin simultaneously. The
D13has a built-in pull-down
Now the software part, for drawing in the screen:
5.A To use with Thonny IDE, py5 and pyfirmata
- Install Thonny and the thonny-py5mode plug-in;
- Inside Thonny IDE, select
Tools > Manage Packages...and install pyFirmata;
- Copy code from:
5.A To use in the Processing IDE:
Arduino Nano example
Definitive setup suggestions
- Tools: pliers and soldering iron;
- Use a tilt switch (mercury switch) instead of a button on
D13to erase drawings in Lousa mágica.
- Setup in a box with a transparent panel, with holes for the potentiometers.
- Pong with potentiometers, Dojo version:
- “Wireless” version made by João Adriano Freitas: