Fixing Google Messenger Issue on Meizu M2 Note

Posted:

If own a Meizu M2 Note like me, you probably have the same problem I have. The Google Messenger app doesn't recognize the SIM card that I am using, but with the Meizu stock Messaging app there's no problem. It shows a message "no preferred SIM selected for sending SMS messages".

To fix this problem, you need to enter the "Engineering Mode" of the M2 Note by dialing number: *#*#3646633#*#*, and you will brought you into something like this.


Now go to BSPTelephonyDevTool.

Under the Default Phone select Phone1 or Phone2 depending on what setup you are currently using. In my case I'm using a SD Card and a SIM card together. The SIM card is active on SIM2 therefore I select Phone2 and ask me to "Reboot device to switch default phone?"


Tap on "YES" and it automatically reboots the phone. You can now use Google Messenger on your Meizu M2 note.

Connecting ESP8266 (ESP-01) and Nokia 5110 LCD

Posted:
Recently, I made a Bitcoin price ticker, which uses ESP8266 module that retrieves the current price of Bitcoin with the use of the CoinDesk API. That project only displays the price on the serial monitor of the Arduino IDE and I wanted to make this project a standalone by connecting a LCD on it.

A Nokia 5110 LCD was my choice because I don’t see a lot of tutorial on how to connect the ESP8266 ESP-01 and the Nokia 5110 LCD on the web.

This LCD uses the PCD8544 controller chip from Philips which was used in Nokia 5110 and 3310 cell phones. This LCD runs on 3.3V and has 3V communication levels, which is great for ESP8266 which also uses the same communication level. The display is small, only about 1.5" in diameter and it’s made of 84x48 individual pixels.

In able to control the LCD, we need a 3 to 5 digital output pins. In the case of ESP8266 ESP-01, there are 8 pins which are: VCC, GND, RX, TX, RST, CH_PD, GPIO0 and GPIO2. So if you are wondering how it is possible, yet ESP-01 has only two GPIOs and the LCD needed 3 to 5 pins?

If you will look to the datasheet of the ESP8266, the pins TX and RX are also GPIO1 and GPIO3. We can then use these two pins to control the LCD. Check the breadboard setup below how did I connect those two.

As I have said, you can use 3 to 5 pins to control the LCD, in my case I used four pins. I saved the RST pin by connecting it to the VCC, you can also save another pin by connecting the CE pin of the LCD to the ground, and in that case you are controlling the LCD using only three pins.

To upload the code, you need to remove first the ESP8266 to the breadboard connection, and set it to program mode. By the way, I’m using the Arduino IDE in programming the ESP8266. I also have a tutorial on how to program the ESP8266 using the Arduino IDE.

Here's my code:
By the way, when you upload this code you will see some warnings on the IDE like the image below. 
But the code works fine! :)

[Part 2] Bitcoin Price Ticker using ESP8266 WiFi Module

Posted:

I wanted to revise my previous project, remove the Arduino and have a standalone ESP8266 Bitcoin price ticker. Flashing NodeMCU firmware and writing LUA script will do the job. But since I love writing codes with the Arduino language, I will do it so.

But first, you needed to have an Arduino IDE with ESP8266 support, you can refer to my previous post to know how. There's also a breadboard setup for the connection between the USB to Serial connector and ESP8266 in that post.

Arduino Sketch:

Here's what you can see on the Serial Monitor after you have uploaded this sketch.


You can also use the <ArduinoJson.h> library for json parsing, check out the GitHub page here. Once installed, try this second sketch.

Arduino Sketch #2:
It's better to add a LCD or LED display to this project and power the device with a battery to make it portable. I will update this post soon once I have bought a proper display for ESP8266.

How to Program ESP8266 using Arduino IDE

Posted:

It's been a while since the ESP8266 community has announced the Arduino IDE support to the WiFi module. This means that you can now directly write codes and program the ESP8266 using the Arduino language and IDE.

You can use the basic functions of the IDE like: pinMode, digitalRead, digitalWriteand analogRead in writing your code.

But before you get started with writing codes, you first need to have an Arduino IDE with ESP8266 support. You can achieve that by downloading the custom build of the Arduino IDE from GitHub. But I don't recommend using that, having a whole separate environment installed is quite manageable since I also have different version installed - the 1.0.x and 1.6.x. I recommend to download the latest version of the IDE on the Arduino website (at the time of writing it's version 1.6.5). The 1.6.x build comes with a simplified support on adding and managing other boards like the ESP8266.

Once you have downloaded the latest version, start the Arduino and open Perferences window and enter this address: http://arduino.esp8266.com/package_esp8266com_index.json into Additional Board Manager URLs field.


Now open the Board Manager from Tools and install the ESP8266 platform.


Once installed, don't forget to select the "Generic ESP8266 module" or other board variant you have from Tools > Board.


The ESP8266 package also comes with the necessary libraries and example codes for the module. So you don't have to worry about anything else.

In able to upload your codes, you need to set the ESP8266 into "Programming mode" by building this breadboard setup. You need a FTDI cable or any USB to Serial converter available.
The red LED connected to GPIO-2 will light up upon plugging the circuit to your computer, this means that the module is now on "Programming mode". The blue LED on the ESP8266 module will begin to blink like crazy once you have initiated the upload button. After that, you must also got a similar message like this on the status window of the Arduino IDE. (You can also try the Blink sketch on the examples for testing. Just change the 13 into 2.)


After the uploading is done, you need to rebuild the circuit in able to run the code properly. You must remove the connection between the GPIO-0 and ground, and build a reset button.
If you use the function Serial.println(); , open the Serial Monitor and press the reset button to start debugging your code.

Bitcoin Price Ticker using ESP8266 WiFi Module

Posted:

Since I love Bitcoin and Arduino, why not make a project with those two?

In this project, I'll be using a Arduino Leonardo Pro Micro together with the ESP8266 WiFi Module. For those who doesn't know about the ESP8266 module, it is a super cheap WiFi module that you can buy for less than Php 300.00 to Php 400.00 here in the Philippines while only Php 150.00 or $5 on Ebay.

And to those who doesn't know yet about Bitcoin, it is a digital currency developed by a person named Satoshi Nakamoto. You can watch this video on YouTube to know more.

Going back to the ESP8266 module, you can interface it to your microcontroller using a serial TTL communication. But be careful, because this module runs on 3.3v power and uses a 3.3v TTL level which most of our MCU uses a 5v TTL level. Also, this module also have its own low power 32-bit CPU which you can program it to act as a standalone unit, just like an Arduino but with a built-in WiFi on it. You can download the datasheet here.

To begin this project, you'll be needing this items: Arduino board; ESP8266; 2.2K ohms resistor; 4.7K ohms resistor and 2 pcs. of zener diode (3.6v) only if you are using a Arduino Pro Micro which only have a 5v output. 


Since I am using a Arduino Pro Micro which only have a 5v output, I made a little tweaky experiment to achieve a 3.3v to 3.7v output. Using a two 3.6v zener diode connected in series, I managed to got a voltage drop of 1.05 volts and an output voltage of 3.74v from the 4.79v output of the board. This seems enough to make the ESP8266 working and to prevent over powering the module. If you are using a Arduino Uno which have a 3.3v output, you can skip this step.


It's now time to setup the circuit. Here's the breadboard setup that I made using Fritzing. As you can see, the two resistors function as a voltage divider, this will let the ESP8266 module to receive only 3.3v TTL level from the Arduino.
Here's the actual photo of my breadboard setup and it's already powered up, sorry is a little bit messy, because the ESP8266 module is not breadboard friendly. I used a female to male connectors to make this done.


Arduino Sketch:
I used the CoinDesk API to get the current price of Bitcoin. In this code, every 60 seconds the Arduino is requesting the ESP8266 module to retrieve the data from this address: http://api.coindesk.com/v1/bpi/currentprice.json, and then the current price is now being displayed in the serial monitor.


Update #1: You can also do this without an Arduino board. Check this out.

Update #2: Jakob suggested using <ArduinoJson.h> for json parsing and it works great! Download the library at GitHub.

Arduino Sketch:
 

Search and Badge

Bitcoin Tip me some Bitcoins:

1FtLCwYPYqtK6ayuNeAVApPXUxTKm7iY5w