The Butler Project Page!
Thank you for taking an interest in the Butler. The Butler is an Arduino computer that was designed with a ton of electronic blocks, and a large audio library spread across four audio chips. The Audio library can be found just below this statement. Consider this page your Butler Manual. You can program the butler as you'd like. Below are fundamental videos and code samples that help you to understand how the most up-to-date iterations of the software works. Take your time, and look around. Have a look at our Demo video!:
Did you just receive your Butler? Watch these videos and read the instructions below them =D
Unboxing your Butler, and installing the LCD:
Getting Started - Talking to your Butler:
In order to communicate with the Butler, you'll need to do the following:
1) You'll need to download the CH340G drivers from github in order for your computer to communicate with the Epoch. Find it here: github.com/HobbyComponents/CH340-Drivers
If you get a driver failure stating that the "HASH" for the driver is not present, then uninstall the driver, and check out OPTION#2 at the link below.http://www.hackaapl.com.php56-3.ord1-1.websitetestlink.com/trouble-installing-windows-10-drivers-the-hash-for-the-file-is-not-present-fix-toggle-driver-signing/
Once you've followed the directions, you can reinstall the driver, and it should work.
2) Download Arduino IDE here: www.arduino.cc/en/software
3) Watch the above video! The most important details lay within!
4) When you're not using your Epoch, power it off unless you're data logging. This is to protect the board from brown-outs.
5) If you are using the AC-DC wall adaptor to power the Epoch as opposed to USB, make sure you use a surge protector/UPS.
You'll need the following libraries in order to compile and program the Butler with the current code:
PS2Keyboard.h - This library allows for you to use an external computer keyboard and can be found here:
https://github.com/PaulStoffregen/PS2Keyboard
SD.h - I believe that comes defauly with Arduino, but I'm not certain. If not, it can be found on github. It allows for you to read and write to an SD card.
Here is some information on this library: https://www.arduino.cc/en/reference/SD
EEPROM.h - Should come default with Arduino. You shouldn't need to look for it. This library allows for you to write to the EEPROM memory within the chip.
liquidcrystal.h - Should come default with Arduino as well. It allows for you to write to the LCD.
RTClib.h - This library allows for you to read and write to the real time clock (DS3231). It can be found here: https://github.com/adafruit/RTClib
RF24Network.h - Required for the NRF24L01+ wireless tranciever. Here is the library: https://github.com/nRF24/RF24Network
RF24.h - Also needed for the NRF24L01+. It can be found here: https://github.com/nRF24/RF24
1) You'll need to download the CH340G drivers from github in order for your computer to communicate with the Epoch. Find it here: github.com/HobbyComponents/CH340-Drivers
If you get a driver failure stating that the "HASH" for the driver is not present, then uninstall the driver, and check out OPTION#2 at the link below.http://www.hackaapl.com.php56-3.ord1-1.websitetestlink.com/trouble-installing-windows-10-drivers-the-hash-for-the-file-is-not-present-fix-toggle-driver-signing/
Once you've followed the directions, you can reinstall the driver, and it should work.
2) Download Arduino IDE here: www.arduino.cc/en/software
3) Watch the above video! The most important details lay within!
4) When you're not using your Epoch, power it off unless you're data logging. This is to protect the board from brown-outs.
5) If you are using the AC-DC wall adaptor to power the Epoch as opposed to USB, make sure you use a surge protector/UPS.
You'll need the following libraries in order to compile and program the Butler with the current code:
PS2Keyboard.h - This library allows for you to use an external computer keyboard and can be found here:
https://github.com/PaulStoffregen/PS2Keyboard
SD.h - I believe that comes defauly with Arduino, but I'm not certain. If not, it can be found on github. It allows for you to read and write to an SD card.
Here is some information on this library: https://www.arduino.cc/en/reference/SD
EEPROM.h - Should come default with Arduino. You shouldn't need to look for it. This library allows for you to write to the EEPROM memory within the chip.
liquidcrystal.h - Should come default with Arduino as well. It allows for you to write to the LCD.
RTClib.h - This library allows for you to read and write to the real time clock (DS3231). It can be found here: https://github.com/adafruit/RTClib
RF24Network.h - Required for the NRF24L01+ wireless tranciever. Here is the library: https://github.com/nRF24/RF24Network
RF24.h - Also needed for the NRF24L01+. It can be found here: https://github.com/nRF24/RF24
The Audio Library:
The Butler Audio look-up table can be found here. There are four tabs. There are instructions in this document that tell you how to play an audio bite, and there are tons of examples in the fundamentals videos and code samples.
butler_v1.0_audio_library.xlsx | |
File Size: | 56 kb |
File Type: | xlsx |
Connecting to Bluetooth (HC-04 or HC-06)
Getting Started with the HC-06/HC-04 and Roboremo! - To use Bluetooth capabilities with the Butler you will need to download the Roboremo app, and use an existing Roboremo UI and the HC-06 or HC-04 Bluetooth tranciever to work with the bluetoothtest() program. Make sure to check out some projects with the HC-06 at instructables.com! You need to download the free version of the Roboremo App! You also need to save the UI file to your phone. Use the following instructions! =D
1) Download the RoboRemo App
2) Download the file below on your phone, and move this file to your RoboRemo folder.
On my phone, the RoboRemo folder can be found in My Files>Device Storage>RoboRemo
3) Once you've successfully moved the file over to the RoboRemo folder, open the RoboRemo app. You do not need to be connected
to the board via to ready this file.
4) Press the Menu button on the top left of your screen.
5) You should now see several options. Select "Interface"
6) You should now see a new menu. Press "Import", and the file below that you've downloaded and moved to the RoboRemo file folder should show up on the screen. Select it, and you should now see the interface that I have designed. You can now connect to your BT relay board, and use it!
Check out the "Getting Started with Bluetooth video below!
Here is the Roboremo UI file!:
1) Download the RoboRemo App
2) Download the file below on your phone, and move this file to your RoboRemo folder.
On my phone, the RoboRemo folder can be found in My Files>Device Storage>RoboRemo
3) Once you've successfully moved the file over to the RoboRemo folder, open the RoboRemo app. You do not need to be connected
to the board via to ready this file.
4) Press the Menu button on the top left of your screen.
5) You should now see several options. Select "Interface"
6) You should now see a new menu. Press "Import", and the file below that you've downloaded and moved to the RoboRemo file folder should show up on the screen. Select it, and you should now see the interface that I have designed. You can now connect to your BT relay board, and use it!
Check out the "Getting Started with Bluetooth video below!
Here is the Roboremo UI file!:
bt_relay | |
File Size: | 2 kb |
File Type: | bt_relay |
Code Samples
The fundamental code samples are what get you up and running. Make sure to look at them in order, as they will build off of one another! The first code sample gets us rolling with the LCD, keyboard, and serial monitor. There's a lot here, but it is carefully commented. Have a gander and try it out on your Butler! This code sample corresponds to Fundamentals video#1.
butler_ks_1.ino | |
File Size: | 17 kb |
File Type: | ino |
Fundamentals#2 - Breaking out the audio capabilities! We will now bring in a bunch of lists and variables, and also declare severarl inputs and outputs associated with the four on-board audio chips, and the 8x8 LED matrix. We'll use the SPI communications protocol to talk to each audio chip, and we'll use the volume of the audio bite to create a "Kitt" based audio tracker/volume meter to simulate a visual voice representation. There's a lot to look at here. They audio section is near the bottom of the code. The next fundamentals video will be a good one. We're going to get to the state-machines function, which allows for us to do many, many different things depending on which word is entered into the Butler. See the fundamentals#2 video for the time being =D
butler_ks_2.ino | |
File Size: | 32 kb |
File Type: | ino |
Fundamentals#3 - Now we're going to add our own words to the word list section, and make the relative modifications to the code. This first code sample is what I start with at the beginning of the fundamentals#3 video, and the second piece of code is what we end up with. Make sure to follow along with the video. Everything is explained in the code sample through comments, but the video makes the process easier to follow and understand.
This is what we start with at the beginning of the Fundamentals#3 video:
This is what we start with at the beginning of the Fundamentals#3 video:
butler_ks_3.ino | |
File Size: | 45 kb |
File Type: | ino |
This is the code that we end up with by the end of the Fundamentals#3 video. The word "patrick' now calls the scream() function, which plays the Wilhelm scream!
butler_ks_3_end_of_video.ino | |
File Size: | 46 kb |
File Type: | ino |
The Butler V1.0 FULL CODE - That's right. This code holds everything. Every library, every GPIO setup and declaration, every program (So far) that I've included in my Butler. From now on, I'll build on this piece of code. Everything is fully commented, and ready to be modified, deleted, or added to! The rest is up to you! The next version will include code additions, and optimisations. Stand by for V2.0!
butler5.ino | |
File Size: | 112 kb |
File Type: | ino |
The Butler V2.0 FULL CODE - I've made some fun changes across the board with this update:
1) You can now escape from the sound and noise LED matrix (Command#4 and command#14) by either typing "exit" into the keyboard, or by pressing any button on the on-board keypad.
2) I've added in the "Kitt" LED array sound function for the last two audio chips. Up until now, the LED matrix only lit up when talking to two of the four chips. Now all are supported.
3) I've commented out the "buzz()" function being called in the adckeypadtest() function. This makes it so that your keypad doesn't beep when pressed. I only edited this out to show you how it can be done. Check out the adckeypadtest() function to comment it back in if you'd like.
4) Command#20: Keyword "network" and Code#20 calls the rfnetwork() function. I've optimized this function and all is outlined in the NRF24L01+ video below. In this function you'll need an Arduino Uno, and another COM port, along with an NRF24L01+ shield. The transmitter code for the Arduino Uno can be found below. Open the serial monitor, and watch the "Getting started with the NRF24L01+" video.
Please check out the "Getting started with the NRF24L01+" and "Getting started with Bluetooth" videos below!
Butler V2.0 Code:
1) You can now escape from the sound and noise LED matrix (Command#4 and command#14) by either typing "exit" into the keyboard, or by pressing any button on the on-board keypad.
2) I've added in the "Kitt" LED array sound function for the last two audio chips. Up until now, the LED matrix only lit up when talking to two of the four chips. Now all are supported.
3) I've commented out the "buzz()" function being called in the adckeypadtest() function. This makes it so that your keypad doesn't beep when pressed. I only edited this out to show you how it can be done. Check out the adckeypadtest() function to comment it back in if you'd like.
4) Command#20: Keyword "network" and Code#20 calls the rfnetwork() function. I've optimized this function and all is outlined in the NRF24L01+ video below. In this function you'll need an Arduino Uno, and another COM port, along with an NRF24L01+ shield. The transmitter code for the Arduino Uno can be found below. Open the serial monitor, and watch the "Getting started with the NRF24L01+" video.
Please check out the "Getting started with the NRF24L01+" and "Getting started with Bluetooth" videos below!
Butler V2.0 Code:
butler_2.0.ino | |
File Size: | 114 kb |
File Type: | ino |
Arduino Uno NRF24L01+ Shield Transmitter Code:
butler_nrf_shield_code.ino | |
File Size: | 6 kb |
File Type: | ino |
Project Videos:
Fundamentals Video#1 - The Keyboard, LCD, and Serial Monitor
Fundamentals#2 - Breaking out the audio capabilities!
Fundamentals#3 - State Machines!
How to use the external IO - Analog pins 7 and 11 are the only two pins available to be used to communicate with external circuits. The below videos hows you how to use them. These analog pins can be used as digital inputs, digital outputs, or as their default setting of ADC input. AN11 can also be used to control the active-high relay. To control the relay, set AN11 as a digital output, and short the RLY-IN header with a jumper. When you set AN11 high, then the relay will turn on. Clear AN11 to 0v to turn the relay off. If you're using AN7 and AN11 as inputs, then you don't need to short the 3.2v headers talkied about in the below video, and no declarations need to be made in void setup(). If you are going to set up AN11 and/or AN7 as digital inputs or digital outputs, here are some examples of how to declare them under void setup():
pinMode(A7,OUTPUT);
// AN7 can now be set to 5v or cleared to 0v using the digitalWrite command. It will act like any other digital GPIO (General purpose input/output pin)
pinMode(A11,INPUT); // A11 can now be sampled to see if the line is high or low. For instance:
if(digitalRead(A11) == HIGH){ // If A11 is rading 5v, then set AN7 to 5v (High)
digitalWrite(A7,HIGH)
}
pinMode(A7,OUTPUT);
// AN7 can now be set to 5v or cleared to 0v using the digitalWrite command. It will act like any other digital GPIO (General purpose input/output pin)
pinMode(A11,INPUT); // A11 can now be sampled to see if the line is high or low. For instance:
if(digitalRead(A11) == HIGH){ // If A11 is rading 5v, then set AN7 to 5v (High)
digitalWrite(A7,HIGH)
}
How to program and test the on-board DS3231 RTC (real Time Clock):
Version2.0 Software with the NRF24L01+ Wireless Arduino Shield!
Choose between USB and the External Power Supply - How to choose!
Communicating via Bluetooth using the Roboremo App and an HC-04/HC-06 Bluetooth Tranciever (See above for Roboremo UI Installation Guide!)