LTE Project renamed “Bone Phone”!

Well, today is my last post on the LTE project. After showing it to my co-workers, it has now been renamed the “bone phone” because of it’s unique shape and color! I’ve also included the at the end of this post with the full story.

To God be the glory, I learned a lot, and made a lot of functions with this phone. The main points are:

  • Send Text messages to any valid number
  • Receive and read text (SMS only) messages from anyone
  • Reply or delete text messages
  • Turn LTE on/off
  • Turn GPS on/off
  • Get your current location
  • Send your current location to someone else via text
  • Compass heading (must be moving to be accurate, based on GPS)
  • Status Bar with battery, GPS, cellular, and messages stats
  • Current local time

There was a lot more things that I wanted to do with this project. unfortunately, I ran out of memory:

Sketch uses 26938 bytes (83%) of program storage space. Maximum is 32256 bytes.
Global variables use 1567 bytes (76%) of dynamic memory, leaving 481 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur.

As you can see from the warning, I’m running out of dynamic memory, or ram. I’ve tried adding a few more things, but anything I add tips it over the edge. Even just a few bytes added seems to make the device slow down so much that it is unusable. You are supposed to leave 512 bytes for running the program, and I’m only leaving 481, which slows it down a bit. But, be sure to check out the project on my GitLab for all the files, the pictures, videos, and 3d printer cad drawings and program! It’s all up for you to work on and improve!

Thanks for following along with me on this project! It’s been a really great learning experience! Not only that, but to God be the glory, it even works! You can read more about it in the readme if you’d like. This readme also includes operating instructions. (It’s easier to read by following the link to the mark down document, but I’ll post it here in case you need it.)

# LTE project (nickname: “Bone Phone”)

You can read more about this project on my blog:
Just search for “LTE project” to see how you can build this open source hardware texting phone for yourself!

This phone can send and receive text messages. Runs off of a 9 volt battery, and has six buttons.

# Operating instructions:

1. Turn on the Bone Phone by flipping the power switch to the “on” position.
2. Once it boots up, you will be presented with the main screen. On every screen, use the numbered button that corosponds to the menu item to select it.
3. Any screen that has you input text or numbers, use the buttons to navigate, 1 is up, to scroll through the numbers or letters, 2 is down, to scroll through the numbers and letters. Whatever letter or number you select is not saved to that spot until you use button 3 (left) or button 4 (right), at which point the letter/number is saved/entered.
4. Some screens tell you to push the select button (button 5) to do special functions. If needed, the screen will display the action you should take.
5. At any time, you can press the “home” button (button 6), which will take you back to the main menu.

# Features

– Send/receive text messages
– Turn on/off data or gps
– View GPS location and send as text
– Compass heading screen if GPS is on
– View network info.
– Using serial over USB, you can do many more features such as download web pages, upload to the web, and more.

# Notes

– I tested this with StraightTalk and simcards. Both worked, but only the hollogram card would allow data if using the serial over USB connection. Both worked for texting.
– When sending a text to a number, you need either of these two formats: +19078675309 or 19078675309. Some phones will not accept unless you have the “+” sign in front of the number. So far, all phones accept the text when you use the “+” sign.
– The device has 2 batteries. One 9 volt battery, which is disposable, and non-chargable. The second battery is a 3.7 volt battery for the modem, which is charged by power from either board input or the 9 volt battery. The power battery percentage from the phone on the status bar is actually for the modem battery, and doesn’t tell you how much battery power you have left in the 9 volt battery, unfortunately.
– The serial over USB works, and you can talk to the board that way, sending and receiving texts, etc.
– The included truth table outlines the different screens and button combinations.
– The bone phone was also supposed to have a mini browser/ftp/http get/put method, as well as a game, but I ran out of memory on the device. Come on, I only had 32 kb of space and 2 kb of ram to work with!

# About – Or, Why “bone phone”?

Well, the design is somewhat dog bone treat shaped, to protect the buttons. Add to that the fact that the original that I 3d printed was white, it did look like a big bone. While showing it to my co-workers one day, one of them said it’s a bone. One then said it was a bone phone. They then all started laughing and we nicknamed it the bone phone.

I built this phone so I can learn about cell phones, c and c++ programming, and work with open source open hardware on a project. This bone phone met all those goals. This bone phone cannot make phone calls, but can send or receive texts.

# Hardware Components

The main board is an Arduino Uno (or knock off), and a Botletics LTE shield, both of which are open source hardware. There is also a Nokia 5110 screen, a slider (on/off) dpst switch, and 6 momentary switches, made by QTEATAK. There were also 6 550 ohm resistors, and a 3.7v lithium cell phone battery that I took out of an old HTC sense cell phone, but any 3.7volt LiPo/Li-ion battery would do.

I also included the files for the 3d printed case that I made. I used a glue gun and glue sticks to hold most of the components and wiring in place. Please see my website for tutorials about how it was put together.

The hardware used was specifically selected because it is all open source hardware.

“Open source hardware is hardware whose design is made publicly available so that anyone can study, modify, distribute, make, and sell the design or hardware based on that design.”

# License

My portion of the software is licensed under the Apache2.0 license:

Copyright 2019 by AlaskaLinuxUser (

Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
See the License for the specific language governing permissions and
limitations under the License.
The software includes three libraries:

– The Adafruit Phona Library – Written by Limor Fried/Ladyada for Adafruit Industries. BSD license, all text above must be included in any redistribution. Which was modified by Botletics, maintaining the BSD license.
– The PCD8544 Library – The MIT License (MIT), Copyright (c) 2013 Carlos Rodrigues <>
– The Arduino software serial library – GPL2.0

Linux – keep it simple.

LTE Project: GPS and Compass screens!


Another update on my LTE project. This one is fairly small, but I worked out the compass screen, which runs off of the GPS. You can see the whole commit here.  What is interesting about this is that I actually edited the library for the LTE shield itself to do what I wanted. Fortunately, it was pretty simple.

The problem is space. I’m running out of dynamic memory. I need to maintain around 500 bytes to run the sketch, but it is difficult when I start adding variables. The Arduino Uno only has 2 kb of ram. So, to call the GPS to get the heading, you need this:

boolean Adafruit_FONA::getGPS(float *lat, float *lon, float *speed_kph, float *heading, float *altitude,
uint16_t *year, uint8_t *month, uint8_t *day, uint8_t *hour, uint8_t *min, float *sec) {

But I only had room for one more float variable. But I found this in the library:

// only grab altitude if needed
if (altitude != NULL) {
// grab altitude
char *altp = strtok(NULL, “,”);
if (! altp) return false;
*altitude = atof(altp);

What does that mean? Well, a lot of variables in the above are allowed to be “null” or nothing. So, I edited the libraries/Botletics_SIMCom_Library_v1.0.0/Adafruit_FONA.h file from this:

boolean getGPS(float *lat, float *lon, float *speed_kph, float *heading, float *altitude,

To this:

boolean getGPS(float *lat, float *lon, float *speed_kph, float *heading, float *altitude = NULL,

Claiming the altitude is null. This is perfect because I can call one float, named heading, and then call the method with just one float instead of a bunch of them. Like this:

case 4:{ // Compass screen
                float heading;
                if (fona.getGPS(&heading, &heading, &heading, &heading)) {
                  lcd.setCursor(0, 1);
                  lcd.print("Heading: "); lcd.print(heading);

So, even though I technically need a float for lat, long, heading, and altitude, now I am just using the heading one and letting it be overwritten by lat, long, etc., and the last one written is the heading! Yes, this is cheating, but praise God, it worked! This LTE project is really coming along!

Linux – keep it simple.

LTE Project: SMS, read and reply!

Of course the Botletics shield that houses the modem was able to receive sms messages the moment I put a sim card in it, but now I can read them on my device! That’s right! Using nothing but the interface and buttons on the device, I can select which message to read, I can view it, and then reply or delete it!

Originally, I was going to have a scrolling screen that you could use the buttons to scroll through and read the text messages. This had several advantages, like being able to see a conversation flow. However, it had some disadvantages too. Namely, I don’t have enough memory left on this thing to hold the messages in the Arduino’s ram.

That said, I needed to just read the message and display it to the screen. I already have a buffer for sending a text message, and a buffer for what phone number to send it to (2 char arrays, the message one is 140, and the phone number is 21). This actually worked out in my favor greatly. With the read screen, you get to choose a message number to read, so I made a small int to hold that number and you can use up and down to change it, or move it by 10 with left and right.

Once you settle on the message to read, you press select, which then reads that message from line into the phone number send char array, and the from message into the send message char array. These are simply displayed on the screen.

With that done, it is actually really easy to delete the message, since you have a message number already, so selecting to delete it, it already knows which one to delete!

Also, replying becomes easy, since the send to phone number is already saved in the send to phone number char array! Also the text message is saved their too, so you can read the message you were sent while you write the new message. I think it is great! The only problem is this: if your wife texts you and says “what should we have for dinner tonight?”, when you hit reply, you have to overwrite that whole message so you can say, “tacos”. So I’m not sure, I may want to blank it out instead, but for now, it’s pretty hand for testing, since I can just hit reply and send the same message back for testing purposes.

Be sure to check out the entire commit for all the good details I missed here!

Linux – keep it simple.

LTE Project: Sent a text message!

Today was a great day for my LTE project! Today I sent a text message using only the buttons on the device itself! It was great to be able to do that from the gui/interface without the need for a serial over USB connection!

So, how does it work? Well, you can check out the entire commit on my GitLab, but I’ll highlight the main parts here. First, I needed a way to type with only 6 buttons, one of them permanently being the “home” button, and one always being the “select/ok” button. So really just 4 buttons. With that in mind, I made a simple interface that I’ve seen before: Up/Down to cycle through the letters/numbers, and Left/Right to move which place you are typing at.

To make that work, I added an array of characters that you can cycle through, like so:

char letterNumbers[91] = {'0','1','2','3','4','5','6','7','8','9',' ','A','B','C','D','E','F','G',

Notice that not every keyboard character is there. You have the forward slash, but not the back slash, due to an issue with char. I’m sure I can work it in, but I needed to get it working first, then I can edit it more later.

Then, I use a variable called curPos to mark which spot in the message you are, and numLetter to hold which number of the 91 characters you are trying to use. It looks like this:

case 30:{ // Screen 5 – Enter phone number screen.
// Up one character
if (numLetter >= 91){
numLetter = 0;
} else {
case 35:{
// Down one character
if (numLetter <= 0){
numLetter = 91;
} else {
case 40:{
// Left one position
if (curPos <= 0){
curPos = 0;
} else {
sendText[curPos] = letterNumbers[numLetter];
case 45:{
// Right one position
if (curPos >= 21){
curPos = 21;
} else {
sendText[curPos] = letterNumbers[numLetter];

It allows you to wrap around from character 91 back to character 0 in the list. Then when you press left or right, it saves the character you chose, say “A” in the spot where you were! It’s a little cumbersome, but it actually works!

The only thing I wonder is if the left button should be like delete, and leave a blank space instead of writing the current character and going left. I’m not sure which works better. I suppose a smart person can actually write the entire text backwards if they mess up and want to retype it…. maybe not.

It can be a little confusing, because it doesn’t save the letter/number/punctuation you have chosen until you move left or right, which appears like it is there, but it is not saved until you move off of it. You also can’t read what is under the “cursor” because it always displays the current chosen character you want to write. I’ll look at ways to fix that, but for now, it’s pretty functional, just not very pretty.

Linux – keep it simple.

LTE Project: Button it up.

Now that I shoved all the wires in there and soldered in the connections for the buttons, I was able to close the case. It still opens, you just have to unscrew the 4 screws to take it apart.

With that, I’ve also made progress on the button reading and programming. As we saw before, the program uses a “truth table” where based on the math formula of (btn# + screenNumber)*screenNumber = menu option, we can calculate all possible outputs and assign them to operations or values.

So, this is a compilation of four different commits:

  1. Update the truth table and screens.
  2. Adding button reading.
  3. Screen updates.
  4. Some small updates.

You can check out all of the above commits to see the process, but here I’ll cover the main part. This is the button reading function.

int read_LCD_buttons(){               // read the buttons
  adc_key_in = 0;
    //adc_key_in = analogRead(A0);       // read the value from the sensor 
    Serial.print("anolog0:"); Serial.println(adc_key_in);
    if (adc_key_in > 550)   return btnRIGHT;
    //adc_key_in = analogRead(A1);       // read the value from the sensor 
    Serial.print("anolog1:"); Serial.println(adc_key_in);
    if (adc_key_in > 550)   return btnUP;
    adc_key_in = analogRead(A2);       // read the value from the sensor 
    Serial.print("anolog2:"); Serial.println(adc_key_in);
    if (adc_key_in > 550)   return btnDOWN;
    adc_key_in = analogRead(A3);       // read the value from the sensor 
    Serial.print("anolog3:"); Serial.println(adc_key_in);
    if (adc_key_in > 550)   return btnLEFT;
    adc_key_in = analogRead(A4);       // read the value from the sensor 
    Serial.print("anolog4:"); Serial.println(adc_key_in);
    if (adc_key_in > 550)   return btnSELECT;
    adc_key_in = analogRead(A5);       // read the value from the sensor 
    Serial.print("anolog5:"); Serial.println(adc_key_in);
    if (adc_key_in > 550)   return btnBACK; 
    return btnNONE;                // when all others fail, return this.

At first, I have it log everything to serial so I can see what is happening. Essentially, I took a wire from 3.3vdc that goes to the button. Then the button goes to the analog input, with a jumper going to a resistor to ground. That way, when you are not pushing the button, then the analog pin is not floating, and reads 0. When you push a button, that input reads around 700. So, I put the threshold at greater than 550. This seems to work fairly well.

The only problem is that I didn’t arrange the buttons the way I thought that I was programming them to work. Rather than swap the button wires physically, I just re-ordered them in my program, saying one was two, etc.

Here is the call inside the loop, asking for which button is pressed:

int waiting = 0;
menuNumber = 0;
while ( waiting < 30 ){
lcd_key = read_LCD_buttons(); // read the buttons
// TESTING ONLY // Serial.print(lcd_key);
switch (lcd_key){

case btnUP:{
menuNumber = (1+screenNumber)*screenNumber;
case btnDOWN:{
menuNumber = (2+screenNumber)*screenNumber;
case btnLEFT:{
menuNumber = (3+screenNumber)*screenNumber;
case btnRIGHT:{
menuNumber = (4+screenNumber)*screenNumber;
case btnSELECT:{
menuNumber = 255;
case btnBACK:{
menuNumber = 256;
// TESTING ONLY // Serial.print(menuNumber);

The above call checks every 10 milliseconds to see if you pressed a button. After 30 checks, it continues through the process and refreshes the screens, etc. This works out to be about a half second, due to the length of the program. There is a small window of about a tenth of a second, where pushing a button doesn’t do anything, but I’ve found in test runs that it was really rare that pushing a button didn’t respond immediately.

If you don’t do this, it is refreshing the screen about 30 times a second as it rips through the program, and there is only a fraction of a second where pushing the button actually works. There is probably a better way to do this, but this works really well for my program.

Now I just need to make it send and receive text messages!

Linux – keep it simple.

LTE project button code


Here’s the deal, I have a very small screen, with six available buttons. I need to make sure that if you press the button, it does the right thing for the screen it is currently on. How do I map the six buttons to the specific screen I’m on, with only 32 kb of programming space?

Well, brilliant or butchered, here’s what I did….

First, I decided on the flow of screens. Example, from the main screen (screen number 1), you can go to the texting screen (sn 6) or GPS screen (sn 3) or the “other programs” screen (sn 12). From the GPS screen, you can go to the location screen (sn 2), or the compass screen (sn 4). And from the texting screen, you can go to the read messages screen (sn 9), or the send messages screen (sn 7), the delete all messages screen (sn 8), and so on and so forth. All told, there is around 15 screens currently.

But how to map pushing the same four buttons for each screen number? There are probably better ways to do this, but I came up with a mathematical formula and a switch to handle this for me.

sn Button 1 Button 2 Button 3 Button 4 Button 5 Button 6
1 2 3 4 5
2 6 8 10 12
3 12 15 18 21
4 20 24 28 32
5 30 35 40 45
6 42 48 54 60
7 56 63 70 77
8 72 80 88 96
9 90 99 108 117
10 110 120 130 140
11 132 143 154 165
12 156 168 180 192
13 182 195 208 221
14 210 224 238 252
15 240 255 270 285
16 272 288 304 320
17 306 323 340 357
18 342 360 378 396
19 380 399 418 437

What the above table does, is utilize the following formula: “Screen number plus Button number is multiplied by Screen number.” With this formula, I then used the variable screen number, which I need for what screen text to display anyways, and made a switch that checks the math to see what button I am pushing. What is interesting about this is that you technically could do any operation from any screen, but the screen number will make the math work only for the operations you should do on that screen.

As you can see, screen number 2 and screen number 3 both share the number 12. In my small table, it is the only occurrence of the same number twice. Fortunately, it is okay, because I made screen 2 the location screen, which you get to from screen 3. So pushing that first button on screen 3 takes you mathematically to screen 2, and on screen 2, pressing the last button takes you mathematically to screen 2, which is where location information is displayed. So it is a little sloppy, but works out in the end.

Buttons 5 and 6 don’t work that way, though. They are special buttons that always return the same two numbers. The first one is the “home” button, which from any screen takes you back to the main menu. The second is the “select” button, which will be unique in use and will have to have a special case by case use. It’s actually not used on any screens thus far, so it is held in reservation for now. I was thinking of making it a modem power on/off switch, but we will see.

As always, you can check out the commit on my GitLab.

Linux – keep it simple.

LTE project fitting, part 1.

As you can see in the pictures, I fitted several of the parts to my LTE project. Add a little hot glue, and viola! You have an LTE project under way! I still have to wire in the buttons, the battery, and the back case needs to get put on, but as of now, it is taking shape!

The button configuration will work something like this:

– 4 left side buttons for choosing which line on the screen.

– 2 right side buttons for special purposes.

Essentially, every screen will have up to 4 lines of text, not counting the status bar. This will allow you to select one of the lines by one of the four buttons on the left. Essentially, it will page through menu options to do what you want to do. Then, on the “unique” screens, the buttons will have functions.

My overall plan is that on the text message view screen, you can scroll through your messages with the last button. On the text message write screen, you can scroll through the letters/numbers/punctuation in an up/down sort of fashion, and then “select” it with the special buttons, but we will see. I might play with it a few different ways to see what works best.

Either way, stay tuned, because it is really coming along!

Linux – keep it simple.

First low resolution sample printed case for my LTE project!

Yesterday I printed up a low resolution (meaning less fill) plastic case for my LTE project. It is really low quality and not very structurally sound. I needed a quick print so that I could look at the design, hold it in my hands, and decide what needed changed.

Overall, I like it.

But, there is room for improvements. The Arduino and LTE shield are in a great spot with easy access to the USB/power plugs, which is great. But, the Nokia screen is larger than the hole I made for it to slip through, so I need to adjust that. Also, my screw holes are twice the size that I thought they would be, so I need to shrink those down. Also, the button holes, for the six functional buttons and one switch are a little too small, making them difficult to use.


I’ve been using FreeCad to build the case, and either my knowledge of 3D modeling is so low, or this program is really tough to use, but this is very difficult. I’ve actually taken more time on building the case (not designing, but actually building) than any other part of the project thus far. If you know of easier to use programs, please let me know in the comments.

The case will be rather large, about 7 x 4 x 1.5 inches. Seems a little overkill, but I need to fit the battery, the Arduino, the LTE shield, the Nokia screen, and the buttons all in there. I went with the raised sides to protect the buttons, so they wouldn’t get slammed or pushed when not in use. We’ll see how well that works.

Linux – keep it simple.

LTE project gets a status bar!

In my continuing effort to learn about programming, cellular service, and Arduino, I’ve made a couple of great developments on my LTE project. Essentially, I’m turning these parts into a texting/gps device. I want to say a phone, but since it uses LTE only, it can’t actually make a phone call. So it is a “smart device” rather than a “smart phone”.

Of course, any useful device needs to have a status bar. And that is what I have done so far. The Nokia 5110 display, at the current font, supports 5 lines of text. So, I decided the top line will always be the status bar. Just like your smart phone, this device uses a status bar to tell you the “status” of everything you really, really need to know in one glance.

The first digits displayed are the battery percentage. If you don’t know how much time you have left on the device before it dies, it can be a little hard to use. Here you can see the magic behind the curtain:

// Get the battery percentage:
uint16_t vbat;
if (! fona.getBattPercent(&vbat)) {
Serial.println(F(“Failed to read Batt”));
lcd.print(“**% “);
} else {
Serial.print(F(“VPct = “)); Serial.print(vbat); Serial.println(F(“%”));
lcd.print(vbat); lcd.print(“% “);

Next up is the GPS indicator. Note that this doesn’t tell you if you have a lock, but does tell you if the battery draining GPS is turned on or off (GPS for on, — for off). Fortunately, the fona library includes a GPS status checking function, so we just call it, like so:

// Get the GPS status:
int statGPS = fona.GPSstatus(); Serial.print(F(“GPS status = “)); Serial.println(statGPS);
if (statGPS == 1) {lcd.print(“GPS “);} else {lcd.print(“— “);}

After that, we have the network status indicator. I’ll delve into that a bit more. It looks like the traditional multi-bar display, but unlike traditional ones on your smart phone, this actually is just full bars, or not. As you can see, you can get different letters for different status, or just the home made bar indicator glyph for roaming or home connections.

// Get the network status:
uint8_t n = fona.getNetworkStatus();
Serial.print(F(“Network status “));
Serial.print(F(“: “));
if (n == 0) {Serial.println(F(“Not registered”)); lcd.print(“X”);}
if (n == 1) {Serial.println(F(“Registered (home)”)); lcd.write(0);}
if (n == 2) {Serial.println(F(“Not registered (searching)”)); lcd.print(“S”);}
if (n == 3) {Serial.println(F(“Denied”)); lcd.print(“D”);}
if (n == 4) {Serial.println(F(“Unknown”)); lcd.print(“?”);}
if (n == 5) {Serial.println(F(“Registered roaming”)); lcd.write(0);}
lcd.print(” “);

Finally, there is a number that tells you how many text messages you currently have.

// Get the number of SMS messages:
int8_t smsnum = fona.getNumSMS();
if (smsnum < 0) {
Serial.println(F(“Could not read # SMS”));
lcd.print(“-0- “);
} else {
Serial.print(smsnum); Serial.println(F(” SMS’s on SIM card!”));

You are welcome to check out the whole commit, but this is the gist of how the status bar works. Currently, the sketch takes up 78% of the Arduino’s memory. I think the direction I am going with this is trying to make a beginning to end, build at home smart device that allows you to at lease navigate by GPS, and send/receive text messages.

If wishes were fishes, and moose’s excuses, I guess we would all have full freezers. With that said, if I am able, I wish I could work in a couple other simple tasks as well, such as a way to play a simple game, perhaps check an email, or maybe a very rudimentary e-link style web browser. But I think that might be a whole lot more than I can realistically accomplish with so little memory on the device. We’ll see though!

Linux – keep it simple.

Arduino LTE Botletics shield and a Nokia 5110 display!


Today was a lot of fun, and I mean a lot! I was able to connect not only the Botletics LTE shield, but also the Nokia 5110 screen to the Arduino, AT THE SAME TIME! I know, for the rest of the Arduino enthusiasts out there, this may seem like child’s play, but it was a big deal for me.

First, I was using the Botletics modified fona library, and with the soldered board pins, it can only connect to the Arduino one way. The problem was that I was also using the PCD8544 library to control the Nokia 5110 display, but some of the pins needed were the same ones for both devices. That certainly wouldn’t do. So, I edited the PCD8544.h file as follows:

PCD8544(uint8_t sclk = 3, // clock (display pin 2)
uint8_t sdin = 4, // data-in (display pin 3)
uint8_t dc = 5, // data select (display pin 4)
uint8_t reset = 12, // reset (display pin 8)
uint8_t sce = 13); // enable (display pin 5)

Changing these pin outs allowed me to control it with the remaining pins on the board. Now I can have both the display and the LTE shield at the same time! Essentially, the old PCD8544 library had used pins 3,4,5,6, and 7, for simplicity. I however couldn’t use 6 and 7, as those were taken by the LTE shield. So, I swapped them in the header file to point to pins 12 and 13, since they were not being used.

The only problem I ran into, though, was space. It takes a lot of space for the fona library to run the LTE shield. Originally, I was going to use the U8 library, but using those two together actually took 109% of the storage space on the Arduino Uno. I tried to trim down the portions of code for the fona side, but couldn’t get everything small enough. Fortunately, the PCD8544 library was much, much smaller, and I found that it even has a simpler interface for text only, which is mostly what I want to use the screen for.

With those two libraries pared up, I added some lines to my LTE demo sketch to allow me to display the battery information on the Nokia 5110 screen. All told the sketch uses 26470 bytes (82%) of the program storage space, the maximum is 32256 bytes. It worked great, looked good, and still leaves room for more programming.

You can check out the full commit, of course, but here is the portion about the screen:

case ‘b’: {
// read the battery voltage and percentage
uint16_t vbat;
if (! fona.getBattVoltage(&vbat)) {
Serial.println(F(“Failed to read Batt”));
} else {
lcd.setCursor(0, 0);
lcd.print(“Battery Status”);
Serial.print(F(“VBat = “)); Serial.print(vbat); Serial.println(F(” mV”));
lcd.setCursor(0, 1); lcd.print(“VBat = “); lcd.print(vbat); lcd.print(” mV”);

if (! fona.getBattPercent(&vbat)) {
Serial.println(F(“Failed to read Batt”));
} else {
Serial.print(F(“VPct = “)); Serial.print(vbat); Serial.println(F(“%”));
lcd.setCursor(0, 2); lcd.print(“VPct = “); lcd.print(vbat); lcd.print(“%”);


Really simple commands to set up the cursor, and then just lcd.print to display information. I really like this simple screen library for text. It doesn’t handle graphics too well, though, which is what the U8 library excelled at.

So I guess now I need to work out some sort of menu system, as well as some sort of buttons if I want to turn this thing into a portable texting/gps/data interface device.

Linux – keep it simple.