If you work in a company that has a website, you know how important it is that the website always be up and running. Thatâs why you constantly see â99.99999% reliability!â all over the fancy server hosting sites. A website canât make money if the system is down, so knowing when that happens and reacting quickly is super important. In this Instructable, we will use the LinkIT ONE board to make an alert system that will play a loud alert siren and send us a text message. This way no matter where we are, we can respond as fast as possible!
Step 1: Supplies
Picture of Supplies
Since weâre harnessing a lot of the built-in power of the LinkIT ONE, we donât need that many external supplies here. You can focus your gathering energy on a quality speaker to play our alarm through!
LinkIT ONE
Speaker (headphones for testing is cool)
SIM Card (Pre-paid for deployment, borrow a friendâs for testing)
An Alarm MP3 File
A Website to check on!
Step 2: Configure your LinkIt ONE Board
Picture of Configure your LinkIt ONE Board
Weâll need to modify some of the switches on the LinkIt One board in order to make it work. Along with the image attached, make sure that you have done the following
1. Set the MS â UART switch to UART (Youâll switch it to MS in a later step temporarily, but not for deployment)
2. Set the USB â BAT switch to USB
3. Set the SPI â SD switch to SPI
Step 3: Connect your GSM and WiFi Antenna
Picture of Connect your GSM and WiFi Antenna
Now, youâll need to make sure and connect both your WiFi and GSM antennaâs to your LinkIT ONE board. Both of these Antennaâs should have come with your LinkIT ONE kit. Attaching them is pretty self-explainatory: Connect the WiFi Antenna do the socket labeled âWiFiâ and your GSM Antenna (Which allows you to send text messages) to the socket labeled âGSMâ
Step 4: Insert Your Sim Card
Picture of Insert Your Sim Card
I know that most people probably donât have a pre-paid SIM card laying around. If you are just prototyping and want to see a proof of concept, feel free to remove it from your current cell phone (or one of your friends) just to try it out. If you get serious and want to make this a full-time gig, you will have to pony up for a pre-paid SIM.
Inserting the SIM card is a fairly straight forward process. Flip over your LinkIt One and look at the smaller big metal piece. You can see in the figure where I inserted my SIM card if you are confused.
After you have inserted the SIM card, be sure to attach your GSM antenna that came with your LinkIt One kit. This will allow you to get a cell signal.
Step 5: Download your Alert Sound
Picture of Download your Alert Sound
You could opt for a rather basic siren alarm, such as this or that. But I chose for something a little more fun đ
Once youâve found your sound, download it. If you found it as a youtube link, go ahead and use a youtube downloader website in order to convert it to an mp3 file. Store in a place youâll remember because weâll be moving it over to the LinkIT ONE very shortly.
Step 6: Install Music On Device
Picture of Install Music On Device
Now, youâll want to install your scary voice file on your device. Because we are using the SPI/SD slot for SPI purposes (Sending a text message) we are not able to use the SD to store our mp3 file. Instead we will have to store it in flash memory.
Drag and Drop Music into the LinkIt One Flash Storage
Turn your LinkIt One device into âMSâ mode (Mass Storage) and your computer will recognize it just like a usb stick. From here, you can easily drag and drop mp3 files over. The problem is that your limited by the 10mb on the LinkIt One, this means only a handful of songs (if they are short!).
Once youâre done, turn your device back to UART mode in order to deploy code to the device!
Step 7: The Code I â WiFi and Checking if the System is Down
If you look over this WiFi client code, youâll see basic code that goes and checks if a we can get data from a website or not. In the case provided, weâve used âwww.google.comâ.
If we canât receive data from that website (AKA, the System is Down) then we write to the serial monitor.
For More Details: Website is Down Detector