Arduino with the use of LCD i2c adapter (Error Receiving Data) - arduino

Good day!
I'm currently working on a device with Arduino UNO, NFC/RFID Module v3, esp8266 and LCD with i2c adapter. The process is TAP card, read card data then send via wifi.
Here's the scenario, the code is working fine without the LCD library. I have used the LEDs as my indicators whether my data has been sent or not. Then I decided to use LCD as my visual indicator.I put the library of the LCD i2c and its corresponding code in my previous sketch (which is perfectly working). Successfully compiled and uploaded the sketch. Although it appears that the data has been successfully sent, but the data were not received by the web.
I have tried removing the code of the LCD i2c again, then the device is really working. Successfully sent the data and all.
Here's the link LCD library that Im using: https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library/tree/master/examples
What are the possible ways to correct this problem? Thank you very much.
Here's some part of my code with LCD:
https://i.stack.imgur.com/BtuBP.jpg
Everytime I add the code for LCD like this one:
lcd.setCursor(4,0);
lcd.print("RELOADER");
,data has been sent successfully but was not received.
Removed that part again and data was received.

Related

Debugging ESP8266 and Arduino Uno by printing to the Serial Monitor

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.

FTDI + ESP8266 [Need to use AT Commands] without Arduino

I am trying to write standalone ESP8266 code so that it can communicate to wifi and change its states. For this, what I want to do is to send some command "AT+CWMODE=1" or "AT+CWMODE=3" to ESP8266 via code and toggle them on push button tap.
So, like in Arduino there is a Serial.write which writes on a serial monitor via SoftwareSerial class.
But when I am sending Serial.write("AT+CWMODE=1") it prints on the monitor as a string rather than changing the wifi state.
Is there a way to send AT commands without using Arduino chip software serial pins?
Thanks.
Sorted out the issue. All those who are new like me to ESP world, I did the serial.write "AT" commands using wifi classes of Esp8266.
You need to connect the board as ESP8266 Generic Module and send/receive data using ESP8266Wifi class, by reading the scanned networks, changing mode, using Serial.read on the connected devices on Access point of Esp8266.
Let me know if someone need help on this future, I will be happy to help.

Arduino Mega and Nextion display Serial communication

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.

Xbee and Arduino acting strangely regardless of code

I'm trying to write a simple code that sends a string to an xbee and one that sends the string back, I was able to do this with XCTU via console, but I want my arduino to send the string.
I was able to use a simple code that read my output from the serial monitor and sends it to an xbee connected via usb adapter, the problem is that I now wrote the code so it sends a predefined string like in the screenshot, but when I write into the monitor it still sends whatever I wrote instead of the static string. I'm also unable to read what I type into the xbee console from XCTU.
I'd love any assistance in this, I've tried uploading and resetting everything to no avail.
Screenshot of problem with the current code of the arduino on the left
You said you were using an Arduino to try to communicate with your XBee Zigbee module.
One thing you have to check is the connection between the TX and RX signals on the Arduino side and on the XBee Zigbee side.
I've helped someone on another forum who used this Seed Studio XBee shield :
If you look at the schematics of this shield, the XBee 'DOut' signal (Tx) is wired to the XB_TX line which can be connected to any of the AJ2 pin with a jumper.
Now on the Arduino side :
On this extract of the Arduino schematics, we can see that the ATMEGA UART has it's RX signal connected to pin 2 of the CPU which is wired to the IOL (AJ2) pin 0.
So, that means that on this shield, the jumper have to be placed between XB_TX and pin 0 of AJ2 to connect the XBee transmission signal (output) to the ATMEGA reception signal (input) [and also XB_RX have to be connected pin 1 of AJ2].
As you didn't mention what kind of shield you were using, you have to double check this point which is a common issue when using serial communication.
In a general way, ALWAYS connect 1 output to N input (except open-drain or open-collector outputs which can be connected together to make a wired OR but which finally have to be connected to N inputs)
Hope this helps
Best regards
From what I can tell on the documentation Xbee "hijacks" the serial system. Instead try blinking an LED to confirm data is being received and sent.
documentation

Arduino UNO + Enc28j60 + DHT11 +PHP & Mysql (LAN MODE)

I'm a arduino newbie, I would like to build an web project for my thesis.
I use arduino uno as microcontroller, DHT11 for temperature sensor and Enc28j60 for the ethernet shield.
The project is used to control LED and monitor the temperature and humidity through a website.
I want to set arduino as client.
I want to simulate this project in LAN mode.
I want to ask:
1. how to set arduino as client?
2. how to receive the temperature data from the arduino and store it to the database(mysql)?
3. how to control led via website?
I had tried arduino as server, and it is succeed.
But I confuse how to set it as client
thank you,
anyone can help me?
You could set up a web server on the computer, and have the Arduino make a GET or POST request to a script (e.g. PHP) on the server that saves values to the database. You could also get the server to return a value that indicates whether the LED should be on or off. More details are found in the Arduino help: http://arduino.cc/en/Reference/EthernetClient
To get the LED to respond quickly in this setup would require the Arduino to continuously poll the script however, which doesn't seem ideal. Why do you want the Arduino to be the client?
because I need to store the temperature data to the database. If I set arduino as a server. I dont know how to store the data to the database. I still dont understand about to control my lamp if i set the arduino as webclient

Resources