🔴How to send sensor Data from Arduino UNO to MySQL Server(PHPMYADMIN) Offline (No internet)?

preview_player
Показать описание
#Arduino #MySQL#node_red_sql
@makersgroup
To send Arduino data to the database you don't need any wifi devices like eas8266, nodemcu, or Wifi shield LAN. You just follow the video and all is done quickly.
The Arduino Code:-

int Humidity=0;
int Temprature=0;
int Light=0;
void setup() {
}
void loop() {
Temprature=random(20,40);
Humidity=random(80,120);
Light=random(100,160);
delay(2000);
}

The JSON code, to import the project:-

[
{
"id": "c73516050e9670c4",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": "",
"env": []
},
{
"id": "8c0759f2b73c30ef",
"type": "serial in",
"z": "c73516050e9670c4",
"name": "",
"serial": "632ce51bae434d89",
"x": 150,
"y": 140,
"wires": [
[
"78c9b7023caae7d3"
]
]
},
{
"id": "78c9b7023caae7d3",
"type": "json",
"z": "c73516050e9670c4",
"name": "",
"property": "payload",
"action": "",
"pretty": false,
"x": 250,
"y": 200,
"wires": [
[
"7fe478bfb80dde25"
]
]
},
{
"id": "7fe478bfb80dde25",
"type": "function",
"z": "c73516050e9670c4",
"name": "",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 360,
"y": 260,
"wires": [
[
"4aebfc352c4acb8b"
]
]
},
{
"id": "4aebfc352c4acb8b",
"type": "mysql",
"z": "c73516050e9670c4",
"mydb": "a8c399d7db9657e5",
"name": "",
"x": 510,
"y": 200,
"wires": [
[]
]
},
{
"id": "632ce51bae434d89",
"type": "serial-port",
"serialport": "COM4",
"serialbaud": "9600",
"databits": "8",
"parity": "none",
"stopbits": "1",
"waitfor": "",
"dtr": "none",
"rts": "none",
"cts": "none",
"dsr": "none",
"newline": "\\n",
"bin": "false",
"out": "char",
"addchar": "",
"responsetimeout": "10000"
},
{
"id": "a8c399d7db9657e5",
"type": "MySQLdatabase",
"name": "",
"host": "127.0.0.1",
"port": "3306",
"db": "test",
"tz": "",
"charset": "UTF8"
}
]
Рекомендации по теме
Комментарии
Автор

Hi, I have problem with database. In my project I use DHT11 and HW-038. In arduino ide I get data from my sensor correctly, but when I am trying to get data in my database, my sql returned empty result. Where can be my mistake?

vsjxmwg
Автор

thanks for the video sir, but i have a problem at the level of my node-red, when i open the work space and go manage palette to install serial or dashboard, it does not show any result instead it shows an error message that "no match found". please i wish someone really help me out.

ByteBrilliant
Автор

Thank you so much, you helped me a lot on my project! 😇

madalinago
Автор

Hi sir I'm not getting serial.in in node red

arjuns
Автор

Hello, we see the data as 0 in SQL even though we are doing the same thing you did. What do we write in SQL Insert Into values(?)? I would be glad if you can help me urgently.

Razor_
Автор

Hello, may I know how the phpmyadmin is connected to mysql?
and how would the arduino read information instead of writing to mysql?

kuraikuranaken
Автор

Can you help us with our project? We used MQ135, MQ7 and DHT11 sensors.
I connected the COM and the database but the values are not showing. My command prompt also shows

"Unexpected string in JSON at position 26"

What does it mean?

lawrencepinlac
Автор

Hi sir
i have a problem when i am trying to upload it gives me the following result
Sketch uses 2688 bytes (8%) of program storage space. Maximum is 32256 bytes.
Global variables use 224 bytes (10%) of dynamic memory, leaving 1824 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xfe
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xfe
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xfe
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xfe
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xfe
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xfe
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xfe
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xfe
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xfe
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xfe
Failed uploading: uploading error: exit status 1


i configure the board to Arduino uno and the port to COM4

gezhagnteramedew
Автор

I keep getting ER_BAD_DB_ERROR when deploying, any idea what the issue could be?

radioactivestijn
Автор

Hello Sir, how can i use the data from the database to give output in terms of LED indications?

vighneshsomoshi
Автор

Hello sir,
i got this problem : " serial port COM5 error: Error: Opening COM5: Access denied"
can you help me?

myapplication
Автор

i tested and it works with arduino mega 2560 too

gustavobocci
Автор

Hello sir, can I still run this even if my arduino is not connected to my computer?

JjayFabor
Автор

I have error that says "column "xxx" cannot be null"

DomixPlayTV
Автор

I am following you step by step its showing successfully deployed but no change in database why is it so

ombahirat
Автор

i have problem. in serial monitor, it's appear correct humidity and temperature. in node-red, serial in and mysql is connected. but the problem is not save in to database. can you help me?

cnsqtdy
Автор

I keep getting ER_BAD_FIELD_ERROR when deploying, any idea what the issue could be?

ukwqwep
Автор

can i use the same approch to recieve data from database ?

eljouska
Автор

COM port is not connected in node-red . What can I do?

pramodpandit
Автор

Can i do a request to database in base of id of a key fob that is scan on arduino and to look in database if it is there or not

lumidemukaj
welcome to shbcf.ru