I recently got one TFT LCD from aliexpress which supports SPI and uses ILI9341.
This is the one.TTT ILI9341
I have the ESP8266 EspressoLite 1 board, and I am using ESP8266 Arduino. (https://github.com/esp8266/Arduino)
I made the following connection :
I made the following connection : SCK #14, MOSI #13, MISO #12 and CS, #4, DC #5,RESET #0
and used the example graphicTest (which is available in the Adafruit_ILI9341-master folder) . I was able to make the display work for a few seconds. In the graphic test, once the line test starts my ESP8266 gets restarted. This was getting repeated .
In my existing project, I used the following code to just show some messages :
Adafruit_ILI9341 tft = Adafruit_ILI9341(4, 5, 13, 14, 0, 12);
tft.begin()
tft.fillScreen(ILI9341_BLACK);
tft.setCursor(0, 0);
tft.setTextColor(ILI9341_GREEN); tft.setTextSize(4);
tft.println(message);
The message is shown once a response is sent back from ESP. This works for a couple of times and then it again gets stuck and reboots.
I am not sure whether I am using the optimised library for ESP8266 for this LCD or whether there is any as such.
I read in forums and could see that there were some adafruit libraries in the ESP8266 Arduino but now that it is not available and only some TFT_Touch_Shield_V2 are present.
Has anyone faced the same issue or can tell me a better way to make this display work with ESP8266 Arduino.
Thanks in advance. !!!
Even i had somewhat the same problem.
There's a library called 'UTFT' which works fine on the device. Try using the library. Thats the best for esp and ILI9341.
Also, you can try using delay() or yield() functions in between.
The esp8266 may restart itself due to the watchdog when a loop a takes long time to process.
Related
I have a little project that includes connecting EPS8266 to the internet and send an API POST request from the data that is passed from my Arduino Uno. Until now, both module works perfectly fine separately (ESP8266 has succeeded connecting to WiFi and Arduino Uno can get the data from somewhere). Now the problem is how will Arduino Uno send the data to ESP8266 so that ESP8266 can make an API POST request as I mention above to send the data. I'm using UNO+WiFi R3 ATmega328P+ESP8266, 32Mb flash, USB-TTL CH340G, Micro-USB chip and by following this tutorial, I know that I have to enable dips number 1 and 2. But by doing so, I will not get the printout that I purposely tell it to (for debugging purpose). I have also watched an Indonesian YouTube video that shows me how to upload the code for both modules (but not for debugging purpose), but I noticed it has more actions than the tutorial gave me, I will just post the actions below:
Translations(I know it's self-explaining, but just in case): Koneksi = connection, Komunikasi = communication
From the image above, I saw that there is a way to debug EPS8266 and Arduino Uno's communication, which is enabling dips number 1, 2, 3, and 4. But when I tried it, the data was not sent, which makes me wondering if the trouble lies on the communication between EPS8266 and Arduino Uno, or enabled dips number is wrong for getting the printout. Is there any way of debugging whether my sent data has been received properly?(This is more important since I need to make sure that my data is the correct data) Or is there a way to just debugging whether the communication succeeds?
My code is really simple, just using Serial.write(something) on my Arduino Uno and Serial.get() on my EPS8266 and both written on my loop() method, not setup(). I also used 9600 baud rates on my Arduino Uno and 115200 baud rates on my ESP8266 (I of course have also tried changing the baud rates to check if there was a printout).
After uploading to your sketch to ESP8266 by switching ON dips 5,6 & 7
Just flip the dip number 7 to OFF.
Open your "Serial Monitor" in Arduino IDE,
Select the correct baud rate, then press the reset button on your Arduino.
You will be able to see your debug messages in your Arduino IDE "Serial Monitor".
Hope this helps.
I am using ESP8266 (NODEMCU 3.0 or something) to make a quadcopter. Ive connected ardu pro mini to RC receiver so I am reading PPM values from it. Pro mini sends data with tx to ESP8266. ESP reads it with software serial with 115200 baudrate. I am communicating with MPU9255 (Waveshire) via I2C either.
My problem is that I cant fully controll my brushless motors. When I was using arduino instead of ESP8266, servo library was the best and reliable. But ESP's servo library is different, since its not AVR, and problems occurs. First of the servo library didnt want to work on most frequencies. I mean default is 50Hz (20000uS) and in this state ESC of motors did armed but unfortunatelly when changes was fast and short (1250-> 1370 -> 1250) it did miss that change like nothing happnd... This makes my D value in PID controller useless...
Sometimes on 100Hz freq all was working fine, but sometimes not...
When Ive started to use analogWrite only 500Hz was working fine, rest of freq didnt want to arm ESCs.
PS. I am using 3.3V to 5V converter for PPM/PWM pins so I am sure that the signal is fine for ESCs.
PS2. I dont have any osciloscope unfortunately.
The ESP82266 present on your module is a RF transceiver integrated circuit that can handle WiFi communication, both configured as a slave to a microcontroller such as the ones present on various Arduino boards, or as a standalone chip by having it's on-board Tensilica L106 32-bit processor programmed via an external SPI flash memory. If used as a slave, the communication between, for example, an Arduino an the ESP82266 can be done using different protocols such as SPI / SDIO or I2C / UART interfaces. Googling a comprehensive Tensilica L106 user guide on the internet doesn't seem an easy task, and it looks as if some people have already failed to find it. If you're seeking to add Wi-Fi capabilities to your quadcopter the solution I suggest is having the Arduino take control over the servos, motors, etc. and hand off messages via SPI to your ESP82266 module. If this isn't the answer you are looking for, please try to be clearer about it, maybe find someone to do as an English translator for you.
However, if this is what you're concerned about, and you would like to use the ESP82266 module as as standalone solution, please link its built-in processor datasheet and the relevant parts of the quadcopters code that might need debugging.
I'm working on Arduino Project using Nextion Display. At first It worked perfectly Arduino used to read and write data to display shown component, but for some reason Nextion doesn't send data to arduino anymore, I checked the Voltage supply common gnd, and wiring is perfect (TX ==> RX2 , RX ==> TX2).
I'm using Nextion Library which is working bu default for Arduino Mega , so no change is necessary.
here is the link to nextion library: https://github.com/itead/ITEADLIB_Arduino_Nextion
I'm sure the code doesn't contain any problems. It's all about serial communication from nextion display.
I have found out that the Nextion Display becomes unresponsive if you have any delays in your loop.
In several parts in the library there are timeouts of 100 millis if you have a larger time out like delay(120) you receive no data at all.
Furthermore the Library you are pointing to is related to using Serial2 look at my solution at github Serial1 or Serial2 in external library reference
This will solve your problem.
I'm in a situation and need some advice.
Scenario 1:
Arduino Uno/Genuino +
ICOMSAT SIM900 Module(http://www.itead.cc/icomsat.html)
(placed the jumpers such that Digital Pin 2 is rx and 3 is TX on the shield)
Code Used: The send receive SMS example code in the arduino website.(
(https://www.arduino.cc/en/Tutorial/GSMExamplesReceiveSMS)
Everything Works fine without a glitch.
Scenario 2:
Arduino Uno/genuino +
GSM breakout board(https://www.google.co.in/search?q=sim900A&espv=2&biw=1600&bih=717&source=lnms&tbm=isch&sa=X&ved=0CAYQ_AUoAWoVChMIqd748qb8yAIVYXumCh2s2Aaq#tbm=isch&q=sim900a+gsm+module&imgdii=9zJcFQBaoLAKzM%3A%3B9zJcFQBaoLAKzM%3A%3B7eDw6qGc3qZjMM%3A&imgrc=9zJcFQBaoLAKzM%3A)
Had loads of issues with softwareSeial.h library and ended up cross connecting the default on board rx/tx with GSM board's RX/TX and everything worked fine. (though I didn't liked the fact that everytime during programming I had to change connections to upload a sketch)
code used is from here (http://www.theengineeringprojects.com/2014/06/send-sms-with-arduino-uno-and-sim900d-using-at-commands.html)
Now my Problem:
Since the shields are very costly, I decided to settle on the cheaper boards for my project. But the Code used for the GSM shield was so easy to understand (since the library was doing all the heavy lifting) I tried to use that. I connected Rx of GSM board to pin 3 and TX to pin 2 of arduino and uploaded the same code I used for the GSM shield scenario. But the code won'r work, I tried to tinker a few blocking things like the enable pin code where the shield is brought up etc. but no luck. Can anyone put some light on it, has this been tried before, is it not supposed to work the was i want it to ?
Thanks a lot in advance.
I have an Arduino Uno and I am using arduino 1.0.5 IDE. I followed he procedures for bootloading an atmega328P-PU on a breadboard.
I uploaded the ArduinoISP sketch first, made the connections(using the External Oscillator) and then wired it up. Then, I selected the programmer as Arduino as ISP, selected the board as Arduino duemilanove w/ Atmega328P. Then I selected the correct serial port and clicked Burn Bootloader.
I got the following errors:
avrdude.exe: stk500_program_enable(): protocol error, expect=0x14,
resp=0x50avrdude.exe: initialization failed, rc=-1 Double
check connections and try again, or use -F to override
this check.avrdude.exe: stk500_disable(): protocol error, expect=0x14,
resp=0x51
How to solve this issue? Also, can I upload the bootloader directly by using it on the Uno in place of the original chip. If so, how?
to my understanding the error you have indicates a bad reading from the chip. I experienced that with chips that were either dead or not properly connected, especially to power supply.
You may find more detailed information in th tutorial : https://www.arduino.cc/en/Tutorial/ArduinoISP
Especially those things :
Note for Arduino 1.0: you need to make one small change to the
ArduinoISP code. Find the line in the heartbeat() function that says
"delay(40);" and change it to "delay(20);".
Select the items in the
Tools > Board and Serial Port menus that correspond to the board you
are using as the programmer (not the board being programmed).
Instead of arduino built-in boot loader just go through below link and it will be great for uploading boot loader and verifying board status info
I am replying you this because same issue I got long back and it saved me.
One more thing for arduino boot loader: for atmega328 you need to put capacitor between reset and gnd( in case you missed)
For gammon bootloader you don't need it.
Be Innovative.
For reset line you might me using 100nf(thats what stated in documentation )...but sometimes it doesn't work...try something like 4.7uf, 22uf or 47uf or close values
I had a similar problem and the issue was that my programmer was a bit slow, I used the -B flag for avrdude to slow down the bitrate and it started working, I set the -B20 and works like a charm every time, but I use the USBTinyISP programmer, not the stk500 one, so this might not work for you.
In case someone stuck at this as I did and nothing like changing the cap value helped. Make sure you are using your USB-TTL adapter in a 5v mode (obviously for a 5v powered chip). I always used it in a 3.3v mode in order not to accidentally burn my 3.3v chips and it always worked. Until today, I was trying to flash my custom atmega8 board and everything worked with the ISP but I was having a hard time using the bootloader and after half a day searching and trying different stuff the 5v setting to the rescue.