HARDWARE

SOFTWARE
Time spend in each part:
Workflow
Wemos D1 mini (ESP8266-based microcontroller)
USB cable (for programming the board)
Dupont cables
3D printed MOAI structure (or equivalent)
Power supply
Smartphone or tablet
🛠 What You’ll Need (Software)
Arduino IDE (installed on your PC)
MIT App Inventor (could use the online version)
Connect the Dupont cables according to the wiring diagram showing in the image below.

Thats all! Simple and easy.
Before opening the Arduino IDE to program the board, make sure you have installed the CH340 drivers (https://www.wch.cn/downloads/CH341SER_EXE.html) so you can program the Wemos board.
Once downloaded, execute it and press the Install button.
Now connect the WeMos D1 mini to your computer using a USB cable.
Now let's add the Wemos boards to the Arduino ID. Open the Arduino IDE.
Go to File > Preferences.
In the "Additional Board Manager URLs", click the icon on the right and paste this URL:
http://arduino.esp8266.com/stable/package_esp8266com_index.json

Click OK, then again OK.
Open the Tools -> Board -> Board Manager menu. In the top search box, next to "Type," enter "ESP8266." In the middle of the box, "by ESP8266 Community version x.xx" will appear. Find the "Install" button in that box and click it. Wait for the installation. Once installed, close the boards window.
Go to Tools > Board > Boards Manager.
Search for ESP8266.
Install the package labeled "by ESP8266 Community".


Go to Tools > Board > ESP8266 Boards and choose: “LOLIN (Wemos) D1 R2 & mini”

Open a new Arduino sketch and delete all existing code.
Paste the Arduino code for the MOAI project into the window.
We need to change a little bit the Arduino code. We need to add your wifi credentials, so the board can connect to the internet.
Locate the following two lines and replace them with your Wi-Fi credentials:
const char* ssid = "YOUR_WIFI_NAME";const char* password = "YOUR_WIFI_PASSWORD";
Click the Verify/Compile button (✓) or go to Sketch > Verify/Compile.
If it compiles correctly, you'll see the message “Compiled”.
Make sure the Wemos is still connected via USB.
Check the correct board is selected: Tools > Board = Wemos D1 mini

Check the correct COM port is selected: Tools > Port = COM port that appears when Wemos is connected.
Tip: unplug and replug the USB to identify the right COM port.
Click Upload (→) or go to Sketch > Upload.

Wait for the upload to complete. You'll see “Uploaded” at the bottom of the IDE.
Go to MIT App Inventor and create a free account.

In the dashboard, go to Projects > Import project (.aia) from my computer.


Upload the provided .aia file in this project.

Open the project.
Go to Build > Android App (APK).

After compiling, a QR code will appear.

Scan it with your phone to download the app.
If you receive a warning like “This file may be harmful”, choose Download anyway.
Open the downloaded file and install the app.
Android may prompt a security scan — you can accept and proceed.
Before using: make sure both the MOAI and the smartphone/tablet are connected to the same Wi-Fi network — the one you entered in the Arduino code.
Connect the MOAI device to a power source (use the same computer with Arduino IDE for the first time).
Open Arduino IDE.
Select the correct COM port again (Tools > Port).
Open the Serial Monitor to read the output — the device’s IP address will appear.
On your smartphone or tablet, open the MOAI app.
Enter the IP address into the app when prompted.
That’s it! The app is now connected to the MOAI.

Tap the center button or image in the app.
The app sends a signal to the Wemos, triggering the feeding mechanism (or lighting up the LED if you're testing).
Fab Lab León student Julio and his Instructor Pablo.
The author remixed this model.
The main changes with the original project was:
- The 3d printed object is totally different, designed by our student Javier
- We have changed the image in the app from the original
- The electronic is simpliest than the original
- We document all the proceses to get this project working.