Alexandre B A Villares


Lousa mágica & Lousa paramétrica

(versão em Português)

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”.

Magic Drawing Board video - Lousa Mágica
Lousa mágica video at Sesc 24 de maio - credits: João Adriano Freitas

Brief history

Materials

Setup instructions

setup

  1. Download and install the Arduino IDE and the Processing IDE;

  2. Connect your Arduino/board to your computer, open the Arduino IDE, and in the menu File > Examples > Firmata look 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;

    Known problems:

    • 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.
  3. Open the Processing IDE and download the Arduino (Firmata) library in Sketch > Import Library... > Add Library.... We suggest you select Python mode on top right corner menu of the IDE instead of the default Java (detailed instructions here);

  4. Connect each potentiometer to your Arduino/board according to the image:

    4.1 Connect the side terminals of each potentiometer to the 5V e GND pins,

    4.2 Connect the central terminals to the board’s analog pins: A1, A2, A3 e A4;

  5. Optionally, if you chose to use a button/switch to erase the drawing in Lousa mágica, it must be connected to the Digital 13 pin and 5V pin;

    If not using the D13 pin, connect the chosen pin terminal to the 10kΩ resistor (so called pull-down resistor) and to the GND pin simultaneously. The D13 has a built-in pull-down

  6. Copy the code LousaMagica.pyde from this repo and alter the number of your serial/USB accordingly! Test using the number of ports that appear in the Processing console, starting from the top of the list: NUM_PORTA = 0.;

    Known problems

    • Linux: confirm you have access to the USB/serial port (as mentioned in item 2).
    • 64-bits Windows: Processing might download the incorrect version (32 bits) of the serial library. You can solve this by deleting or renaming the file in C:\Program Files\processing-3.X.X\modes\java\libraries\serial\library\windows32\jSSC-2.8.dll as documented in issue 227.

Explore other versions in the repo github.com/villares/lousa-magica:

Arduino Nano example

setup

Definitive setup suggestions

Other ideas


Alexandre B A Villares (abav.lugaralgum.com), CC-BY-NC-SA-4.0 License Translated by Carolina Giorno