We are using node-red to create this application.
Node-red is a flow-based programming tool that help us creating application in a very fast way. If a pre-build node is note avaiable we can create custom functions using Javascript and NodeJS.
With this application we can play a list of songs, skip them by tapping on the table and changing volume by putting our hand on the top of the board at different distance.
Solder the speaker to Kitra520 external connectorFirst we need to solder the speaker. You can check the schematic of the external connector HERE.
Update Linux KernelTo make audio work on Kitra520 we need to install the latest Linux kernel: You can do it by following this step by step tutorial: LINK
Install toolsTo connect the board to the network follow the getting started guide: LINK. We need to install node-red, mplayer and espeak.
$ dnf update
$ dnf install node
$ dnf install npm
$ npm cache clean -f #to download last nodejs version
$ npm install -g n #to download last nodejs version
$ n stable #to download last nodejs version
$ reboot #required for upgrade
$ npm install -g node-red
$ dnf install mplayer
$ dnf install espeak
If you have troubles running 'dnf update' run the following:
$ sed -i 's|archive\.fedoraproject\.org\/pub|archives\.fedoraproject\.org\/pub\/archive|g' /etc/yum.repos.d/*
And retry.
Load some songs into the boardFirst check your IP address by running:
ifconfig wlan0
Connect via SSH to the Kitra520 (Ex. using FileZilla) and paste 10 songs into the board's /home/ folder. Song name of every file must begin with 'Song' and a number from 0 to 9.
Ex:
- Song0_This Is What You Came For.mp3
- Song1_Alvaro Soler - Sofia.mp3
- ...
- Song9_Flo Rida - Whistle.mp3
Run
node-red &
On your PC open a browser and open a page on this address:
<MY_IP_ADDRESS>:1880
Select Import->Clipboard. Paste the following text: LINK
Click "Deploy".
Comments