Introduction: Electronic "Wooden Fish"

Wooden fish is often used in rituals usually involving the recitation of sutras, or Buddhist texts. Merit-making is important to Buddhist practice, and it is a beneficial and protective force which accumulates as a result of good deeds, acts, or thoughts. People can earn merit through beating the wooden fish.

This project is a fish-shaped electronic “wooden fish” made of acrylic panels. It needs a seven segment display, and an Adafruit Audio FX Sound Board connected up to the Feather Huzzah ESP8266 wifi board. The Adafruit Huzzah board will also be connected to IFTTT via Adafruit IO. The top of the wooden fish will display my merit count. The number of beats and the sound of beating are controlled by my phone. I can remotely beat the electronic "wooden fish" whenever I realize I have done something wrong, such as evading fares.

Supplies

For this project, you will need the following materials:

Adafruit Feather HUZZAH with ESP8266 WiFi

4-digit 7-segment display with i2c backpack

2xHalf Sized Premium Breadboard and breadboard wires 

Micro USB cable

12" x 12" Gray Acrylic Sheet

Lithium Polymer Battery 3.7V

and the following tools:

Soldering iron and solder

Flush diagonal cutters

Step 1: Download & Cut Files

You need a 12" x 12" Gray Acrylic Sheet and the following wooden fish illustrator file which is ready to be sent to a laser cutter.

Step 2: Creating the Applet

Next, you will set up the adafruit and button widgets on ifttt to enable the data we send to be triggered.

First you need to register your account on adafruit io and ifttt to create the applet.

Follow the links to set up your Feather Huzzah ESP8266 wifi board:

1. Review Adafruit Huzzah Board setup

2. Setup IO account

3. Add IO Package to Arduino

4. Create a feed called ‘Merit’ in your IO

By using IFTTT, we will connect the Button widget, Adafruit IO, and your phone to record the merit count.

1. Create new applet

2. Click on +this

3. Select Button widget

4. Select ‘Button press’

5. Select “Merit” for feed name

6. Enter a number in Date field

7. Click on Create action

8. Click on Continue

9. Name your Applet and finish


Sensors send notifications to Adafruit IO's "Merit" feed when they are triggered. It would then connect to your phone via IFTTT and send data to your wifi board.

Step 3: Writing the Code

This section describes the code on the hardware that counts the number of button clicks with the control sound and communicates with the server.

The code we are intending to use is based on Adafruit's ESP8266 sample code. It has been tweaked according to this project.

Before uploading the code to your board, you need to replace the text in the code containing your Wifi info and Adafruit IO info:

Wifi network name

Wifi network Password

io.adafruit username

io.adafruit key (this can be found on your io.adafruit dashboard)

1. Check if all the libraries have been added -ESP8266WiFi, AdafruitIO, Adafruit_MQTT, ArduinoHttpClient.

2. Try testing if your LED works by using 7 segment.

3. Upload the adafruitio_woodenfish code to your board.



Step 4: Solder Circuit

Circuit Diagram

Step 5: Put It All Together!

Stick the circuit on the back of the electronic “wooden fish”. Plug in and gain your merit!