Introduction: LinkIt ONE Pager

Who uses a pager anymore? Well actually, lots of people. Pagers are still pretty popular among people who need to know things in a hurry because having internet all the time (even with 4G) still isn't as reliable as a good old pager.

In this tutorial, we'll use the LinkIT ONE to create our very own pager. Due to the LinkIT ONE's powerful capabilities, such as a built in battery pack and GSM slot, we can easily manipulate certain components that would take much more hardware and skill on a regular old Arduino.

Step 1: Supplies

If you got the Arduino Grove Starter Kit, you should be in business fairly quickly. Otherwise, you'll need to obtain some of these things on your own:

  • LinkIt ONE
  • Pre-paid SIM Card
  • Grove Arduino Base Shield
  • Grove - LCD RGB Backlight

Step 2: 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

2. Set the USB -- BAT switch to USB

3. Set the SPI -- SD switch to SPI

Connect the GSM Antenna in order to receive Text Messages and phone calls!

Step 3: 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 4: Attach Grove Board and LCD

The LinkIT ONE has the same pin layout as the arduino, thus an arduino grove board extension fits on top of it in a very similar fashion. Simply line up all the pins and plug it in.

Then, you're going to want to attach the Grove RGB LCD into an I2C slot. This will allow us to interact with it.

Step 5: CODE I - Interacting With the LCD

First, let's go over some basic LCD code. You'll need to install this library in order to interact with the LCD on your LinkIT ONE Board. This is a special library that allows us to easily send commands to the Grove LCD. We will use this board in the later code file to print out the number that texted us and the message.

Use this example file to quickly understand the Grove LCD.

Step 6: CODE II - Receiving a Text Message

Next, let's go over how exactly we will receive a text message. We'll make extensive use of the LGSM library, so it might help to read up on that a bit. There are some great online resources if you wish to do that.

First, we want to catch a text message. Following the logic within the loop() function...

if(LSMS.available()) // Check if there is new SMS    {

This giant if block checks to see if a new text message is available. If it is, let's continue and go and parse it.

LSMS.remoteNumber(p_num, 20); // display Number part
Serial.println("There is new message."); Serial.print("Number:"); Serial.println(p_num); Serial.print("Content:"); // display Content part

Next, we print some basic debugging info. When this thing is deployed, we probably don't care much about the serial output, but it is always good practice to print this out just in case we want to go back and take a look.

while(true)
{ int v = LSMS.read(); if(v < 0) break;
		dtaget[len++] = (char)v;
            Serial.print((char)v);
        }

Next we're going to read the text message. It's a little difficult because with this embedded technology, it's not so simple as 'String = textMessage.read();'. Instead, we have to read the bytes from the text message character by character, forming an array of characters that is our eventual message. This is done in the above while loop.

LSMS.flush(); // delete message

Now, to save space on the device, we'll 'flush' or delete the message.

And that's more or less it! Now let's combine the two to create our pager...

Step 7: Code III: Putting It All Together

Now, we'll combine both the LCd and Text messaging library to receive a text, and show it on our LCD. I've put in a bit of extra code to help polish it up a bit. Hopefully the comments can help you follow along.

Copy this code over to your arduino IDE and deploy!

Step 8: Conclusion

Clearly the LinkIT ONE is a very powerful prototyping device. Hopefully this tutorial has taught you a thing or two about it and how we can create some really cool projects with it.