This software is designed to take an image (that was drawn or uploaded on GUI), find closest color from coler pallet, and send to Arduino in order to create an image using Microfluidics
- Python
- pip
- Arduino IDE
- ESP32 Library installed if using ESP32
- Microcontroller
- Arduino Uno/Nano
- ESP32 with Arduino IDE
- Cables
- USB Type A or C (computer)
- USB Type Mini-B for Arduino Nano
- USB Type A Male for Arduino Uno
- USB Type Micro-C for ESP32
- Install python3
- Install pip with the following command prompt
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python get-pip.py
- Clone this repository
$ git clone https://github.com/CIDARLAB/drop2image.git
$ cd drop2image
- Install required libraries and Run the program
$ pip install -r requirements.txt
- Open Serial_Arduino.ino in Arduino IDE
- Choose Board and Port that corresponds to your Arduino/ESP under Tools
3. Upload the code to the board using
- Install required libraries and Run the program
$ pip install -r requirements.txt
$ python3 pixel_art_gui.py
- To draw an image, Choose color and click on each pixel
- default color is gray
- if you color a pixel as skip, that pixel will be ignored when saved
- To save an image, Click on Save
- When you click save, it will save to your current directory
- When you click save as, you can choose where to save
- To fetch images, Click on Partition Mosaic
- Save images in concat_image directory
- Follow the name convention filename_[row]_[column].png
- Example images are already in the directory
- Make sure to delete example images when you are creating your own
- This also supports .jpeg
- To load an image, Click on Load
- When Load is clicked, pop-up window to select the image will show up
- Choose an image, then it will be resized, parsed, and shown on the pixel grid
- To send color information to Arduino, Choose the device in drop-down and Click Send
- If you are a Windows user, device usually starts with
COM
- If you are a Mac user, device usually starts with
/dev/cu.
- It will send the index of color in the color set
- To make sure that send is working, click on Serial Monitor at top-left cornor
- Install required libraries and Run the program
$ cd drop2image
$ pip install -r requirements.txt
$ cd main
$ python3 main.py
- To Upload an Image, Click on Upload Image button and choose your image file
- To Save an Image, Click on Save Image
- To Draw an Image, Choose color from color set and Draw
- Default color is black
- Default size of grid is 50x50