World of Bauds

Pages

Sunday, July 31, 2016

The Beginning
==========
I bought two of ESP8266 from my local store. And try to play with them using Arduino UNO.
The ESP8266 needs the 3.3 powersupply. And tried to use the 3.3 of the UNO but no avail.
So i setup the LM317T in a breadboard like this.

I replaced the 470 with 1k simply because if the dummy load is attached the voltage drop badly.
After several trial&error the best fit is 1k. It is showing 3.6 with no load with 4.8V from the USB
wallplug powersupply. Then i arrange my UNO and ESP8266 as in the picture.

**Fritzing, will be updated soon**

1. AT+CWMODE=1
1 => Connect to Station or as a client
2 => As Router
3 => Both, you will notice that it has router ip and static client IP by AT+CIFSR
2. AT+CIPSTA="192.168.1.95"
Set static IP
3. AT+CWJAP="TP-LINK_BOSSD","**yourpassword**"
To connect to your wifi
4. AT+CIPMUX=1
Whether to use Multiple connection or Single, later in my code i use single
5. AT+CIPSTART=1,"TCP","your.server.com",80
Open a Connection
6. AT+CIPSEND=1,+2 Where the 1 for the Multiple ID but to simplify later i use Mux=0 (Single) so you only need to create the AT command with AT+CIPSEND=NByte
Where NByet is the length of your string,
Example: GET /minimal.php/this HTTP/1.0 Total of NLength is 30 plus 2 pairs of NL/CR \r\n. -->
Note if your trying these steps using the arduino serial monitor dialog,
then set the ending to "Both NL/CR", paste the "GET ..." string
and hit an Enter key and one more Enter key.

Troubleshoot
=========
1. While the 2 Arduino UNO hooks to my Laptop,
The esp8266 serial line keeps jumping and sending data.
By powering one of the UNO to external power removed the `jumpy`
2. Arduino 5V must also connected to external power supply that source the LM317T
Which i use an USB 5V wallplug.

3.AT+IPR=9600 to change the baudrate. DO NOT USE THIS!!!
but to use AT+UART=9600,8,1,0,0 (The flow control has to be disabled!)
4. I set my HardwareSerial or Serial.begin(19200) twice of the SoftwareSerial
after several trial&error it is better to configured like such to remove gibberish output.
Using 9V also gives more stability. All gibberish are almost removed completely.
5. Zener 3.3V and a resistor of 68ohm before the zener to GND fails to provide
stable 3.3V, it always shows 4.5V
6. All GND must be connected! I forgot to connect my Arduino GDN to common GND
and the result is gibberish output at the serial monitor

Reference
=========
1. The full AT commands
2. I found the doc about AT+UART to change baudratehere but it says that is deprecated??
as my AT+GMR output is this
AT+GMR
AT version:0.21.0.0
SDK version:0.9.5

Friday, July 29, 2016

After for sometimes, probably 2 to 3 years, of playing with Arduino. I am more and more getting
serious with it. Using the Arduino IDE to hurting me, personally. I want to use my Vim and maybe
just use "make" Makefile. The result very exciting that Arduino-Makefile is the answer.

All i had to do is download and copy the example or maybe you could use this

### DISCLAIMER
### This is an example Makefile and it MUST be configured to suit your needs.
### For detailed explanations about all of the available options, please refer
### to https://github.com/sudar/Arduino-Makefile/blob/master/arduino-mk-vars.md
### Original project where this Makefile comes from: https://github.com/WeAreLeka/Bare-Arduino-Project

### PROJECT_DIR
### This is the path to where you have created/cloned your project
PROJECT_DIR = $(CURRENT_DIR)

### CFLAGS_STD
### Set the C standard to be used during compilation. Documentation (https://github.com/WeAreLeka/Arduino-Makefile/blob/std-flags/arduino-mk-vars.md#cflags_std)
CFLAGS_STD = -std=gnu11

### CXXFLAGS_STD
### Set the C++ standard to be used during compilation. Documentation (https://github.com/WeAreLeka/Arduino-Makefile/blob/std-flags/arduino-mk-vars.md#cxxflags_std)
CXXFLAGS_STD = -std=gnu++11

Tuesday, July 26, 2016

After googling for sometime looking the way to override the function of
UIViewController to prevent the autoRotation yet with no good answer.
Then the Apple developer documentation does states that one can edit from info.plist.

Opening the info.plist in XCode editor looks pretty but i was not be able to look at
the supported orientation list. And using Vim the list is presented in plain XML.
Looking at this line, UISupportedInterfaceOrientations
and leaving onlyUIInterfaceOrientationPortrait

Tuesday, January 19, 2016

Having some bunches of E/OMXCodec error? That saying unable to playback your audio files?
Well i had been struggle with the same error. My situation is to play an MP3 file with
Android MediaPlayer API. The API works fine in my android 4.0 and 4.2 that plays
the alarm sound.

But it fails in my newer phones, which runs android 4.4.2. So i googled and found out that the MP3
also could be played with Ringtone and RingtoneManager.