Been pestering you poor people since around November but I finally got the first pass at my cell phone up and running.
This is the "home" screen. Across the top is the menu bar that can have text, icons, what have you. This screen has battery charge and RSSI indicators. Across the bottom, on the home screen is my five "standard" phone icons. Phone, SMS, Contacts, Calculator, Settings/Debug. The phone runs on what I'm calling litlOS Its basically an Arduino sketch swapper. There is an object called a panel and that has setup() & loop() methods. You can get your sketches running independently, then just wrap them into a panel object and the OS takes care of swapping them in and out of memory. Actually there are also close() and closing() methods. One can be called to quit a panel and the other is called when a panel is shutting down.
First app panel is the phone dialer. You can dial a call from here. If you choose a contact from your contact list and click the phone icon, this is where the call is dialed. Also, if an incoming call is detected, this panel takes care of it and lets you decide if you want to answer or not. And yes it has caller ID so you'll know if its someone from your contact list as well.
SMS panel for texting. Notice all the sub-panels have a red X in the top left corner. This takes you back to the home panel. When you send a text message it goes on the screen as yellow. If its successfully sent it turns to green. Incoming text are white. The nickname of the person your texting is at the top of the panel.
Contact list. Now that I know more, I think this should be broken into two panels. One for locating contacts and one for editing them. For now this screen is it, and does it all. You can add contacts, delete them, call them, text them, and if you touch a data field, you can edit the information of them as well.
The calculator. This is my HP (RPN) calculator that I originally wrote for Macintosh then ported to Arduino. Now I wrapped it into a panel object and it lives on in my phone. Actually very handy.
Tools or settings. This started out as a settings panel but turned into status/debugging window. Later, hopefully, it'll go back to being a user's setting window. What its showing is what's going on in FONA land. Are there messages to grab? Phone calls to answer? Things like that. The Feather FONA is polled every 750 ms to see what's going on.
The question game. This was a sketch I used to test the SD file library I wrote as a bases for database operations. Turns out cellphones rely heavily on stored data. Never realized it 'till I tried to build one. To deal with this I had to write some pretty fun file handling code. Took awhile!
Breakout! I wrote this a long time ago. I thought it would be fun to add to the phone and would be a good test case for controlling things using a touch screen. It was kinda' tough because the code base on this was a bit of a hack to begin with. Its better now. And it works!
The innards. On the right is the FONA Feather that runs all the hardware. Next to that on its left is the teensy3.2 that runs the GUI and user SD drive. This is an early version with the smaller 500mah battery. That just didn't work at all. Now there's a whopper lipo in there that's almost the size of the screen. I had to print up a larger case to hold all the innards.
What's next? Donno' it about destroyed my brain just to get this far. I'm thinking to add a radio panel and see if I can get the FM tuner working with headphones. That wold be fun. Most of the foundation code is pretty solid by now. The GUI, by the end, was starting to get a bit hacked up. It would be nice to rewrite the GUI using what I know now. But, I'm pretty burnt at the moment. So I doubt it'll happen soon.
Here's the Fritzing file. : http://leftcoast.biz/justStuff/cellPhone/cellphone.fzz
The code : https://github.com/leftCoast/Arduino The FONA code is cellphone_IV and the teensy GUI is cellphone_VI Then in the library look for folders that start with LC_ there's masses of them. If anyone tries to compile this nightmare, remember the Feather and the Teensy need to be compiled with different settings. The teensy must NOT use more than 72 Mhz or the screen kinda' goes wonky. The Feather just uses what ever Adafruit set up for it as defaults.
Have fun!
-jim lee
Finally got my cellphone up and running. (Base feature set)
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- jim_lee
- Posts: 709
- Joined: Thu May 24, 2012 8:24 pm
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Finally got my cellphone up and running. (Base feature s
That's an impressive build.. thanks for posting the photos and the links!
- jim_lee
- Posts: 709
- Joined: Thu May 24, 2012 8:24 pm
Re: Finally got my cellphone up and running. (Base feature s
Your welcome!
The rough part is that it is seemingly unending. Now that I have it working I find the biggest issue is that it needs a lock screen so I can put it in my pocket. But to do that I need to write code that gives me "gestures".. Then on top of that, the GFX library really needs some sort of clipping rectangle for limiting drawing. That being the bases for smooth scrolling, dialog boxes and MUCH faster screen updates..
I could drive you insane!
-jim lee
The rough part is that it is seemingly unending. Now that I have it working I find the biggest issue is that it needs a lock screen so I can put it in my pocket. But to do that I need to write code that gives me "gestures".. Then on top of that, the GFX library really needs some sort of clipping rectangle for limiting drawing. That being the bases for smooth scrolling, dialog boxes and MUCH faster screen updates..
I could drive you insane!
-jim lee
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Finally got my cellphone up and running. (Base feature s
That's the nature of the beast.. no hardware or software project is ever 'done', you just reach a point where you're willing to live with it (for now). ;-)jim_lee wrote:The rough part is that it is seemingly unending.
The microcontrollers don't have enough RAM for a screen buffer, so things like that are a lot harder than they sound.jim_lee wrote:Then on top of that, the GFX library really needs some sort of clipping rectangle for limiting drawing.
- jim_lee
- Posts: 709
- Joined: Thu May 24, 2012 8:24 pm
Re: Finally got my cellphone up and running. (Base feature s
Well actually the thought is just that when I want to draw, I first check to see if I'm in the clipping rectangle. If so, write the pixel, if not? Move on. My code has dynamic lists of drawing objects and groups. This would also help hugely for trimming entire subgroups off the list of things to draw. This is also why I use the teensy for GUI stuff. 64K or RAM becomes pretty essential for running even a basic windowing system.
I keep thinking about all this because speed of drawing has been a huge thorn in my side since the beginning. Drawing the "home" screen with the .bmp image on it takes around 5 seconds. I tried grabbing the image one entire line at a time into a buffer then blitting out the entire line to the screen at once. No luck. It was actually slightly slower. The other idea I tried was to trim most of the white off the image sides. Draw out two white rectangles, then the image between. No luck. In the end I just made the image full size and let it grind its way through.
One trick I've been using, just to make things "look" better is to shut off the backlight to the screen when swapping out my different sketches. Click an icon, quick fade to black, then fade back to a fully draw screen. Vast improvement over watching everything scramble around drawing itself. But going back to the home screen takes so long, most people's first reaction is "Oh, I broke it, sorry".
I really do need the lock screen though. Its nearly useless without one.
-sigh..
-jim lee
I keep thinking about all this because speed of drawing has been a huge thorn in my side since the beginning. Drawing the "home" screen with the .bmp image on it takes around 5 seconds. I tried grabbing the image one entire line at a time into a buffer then blitting out the entire line to the screen at once. No luck. It was actually slightly slower. The other idea I tried was to trim most of the white off the image sides. Draw out two white rectangles, then the image between. No luck. In the end I just made the image full size and let it grind its way through.
One trick I've been using, just to make things "look" better is to shut off the backlight to the screen when swapping out my different sketches. Click an icon, quick fade to black, then fade back to a fully draw screen. Vast improvement over watching everything scramble around drawing itself. But going back to the home screen takes so long, most people's first reaction is "Oh, I broke it, sorry".
Haha! In a previous life I found the exact same thing doing bodywork on cars! After awhile it was "Fine! That's good enough!"That's the nature of the beast.. no hardware or software project is ever 'done', you just reach a point where you're willing to live with it (for now). ;-)
I really do need the lock screen though. Its nearly useless without one.
-sigh..
-jim lee
- DJDevon3
- Posts: 210
- Joined: Wed Mar 06, 2019 11:02 am
Re: Finally got my cellphone up and running. (Base feature s
That is awesome! I wanted to try something like that eventually. You did a superb job. Bravo!
- jim_lee
- Posts: 709
- Joined: Thu May 24, 2012 8:24 pm
Re: Finally got my cellphone up and running. (Base feature s
Thanks! It was quite the project!
-jim lee
-jim lee
Please be positive and constructive with your questions and comments.