Data Logger using STM32 || ESP8266 || Thingspeak
HTML-код
- Опубликовано: 30 июл 2024
- Purchase the Products shown in this video from :: controllerstech.store
________________________________________________________________________________________
How to log data to Thingspeak server using STM32 and ESP8266
To download the code, goto controllerstech.com/data-logg...
ESP IOT Playlist • Internet Of Things wit...
________________________________________________________________________________________
****** SUPPORT US BY DONATING*****
paypal.me/controllertech
******Join the Membership******
/ @controllerstech
Join the Discord Server / discord
Join the Telegram Group t.me/controllerstechdiscuss
Follow me on Instagram / controllerstech
For more info, visit www.controllerstech.com - Наука
You are amazing. I haven't tried it out, but if it works i'm gonna be very happy!
For someone who hates hearing voice recordings, this type of narration is a Godsend!!
Nice video keep it 👌 thank you very much
Tq bro it's useful our major project
Hi, why I can't send my multiple data sensor SCT 013 using DMA to thingspeak ?
Hi for some reason I am stuck in the USART2_IRQHandler function. It goes in Uart_isr(&huart2) and then comes back again and so on. Do you know what the issue could be ?
Excellent!!!
I have a problem, i use the nucleo f303 the program it stucks at ESP_Init(). What should i do?
Amazing tutorials...
I managed to do this tutorial with ESP8266-01, LDR sensor, and STM32F103C8. The only thing that I need to change is to use a crystal clock.
nice tutorial 👍
can u give example how to sync ds3231 rtc with NTP time using esp8266 as interface to internet. Thank u
Hi, In the tutorial you have mentioned that you activated uart1(PA9,PA10) but in the picture and movie you have connected (D8,D2) pins? Can you please clear this for me I am confused!
on nucleo boards, D8 is PA9, and D2 is PA10
can I turn on a led from thingspeak??
sir, firstly thanking you a lot for sharing your knowledge. can you please make a video to send sensor data to thingspeak or any other platform like rabbit mq using mqtt protocol in stm32cubeide.
@ControllersTech, firstly thanking you a lot for sharing your knowledge. can you please make a video to send sensor data to thingspeak or any other platform like rabbit mq using mqtt protocol in stm32cubeide.
Esp files are deleted in github. Could u please upload them again. I couldnt find them
Why using black themes is not a good sight
.elf file missing within Debug....how to solve this issue
sir can u upload a video of same using hx711 sensor of storing data
BGM of this video really gives me confidence and a peace of mind
I have been debugging for over a week. My code gets to ESP_init and then appears to get stuck in the Uart isr. I am not sure when it is supposed to move on from ESP_init but my code gets stuck there. Not sure if I'm not understanding the code right or if I'm not getting good connection to my ESP-01
Nvm. I figured it out. My HAL_Delay wasn’t long enough after AT+RST because my clock was configured differently than yours. Also after (AT+CWJAP…) wait for waits for “GOT IP” but my ESP was sending “OK” so changing that field to OK solved the problem. Hope this helps anyone having similar issues
@@JoelAnth0ny good day, how long is the delay?
I had a problem when I added the library.
"Error: L6200E: Symbol huart1 multiply defined (by uartringbuffer.o and main.o)"
Can you help me fix it please.
I fixed it by copying the library and putting it into main.c, and removing the old library (UartRingbuffer.c)
It worked, but I still want to know how to fix the UartRingbuffer library or main to work as your tutorials.
Thank you so much
In the uartringbuffer.c, where the huart1 is defined, put extern in front of it.
@@ControllersTech thank you very much
would you please make a project compining mqtt + ESP8266 module + STM32
how to get external serial monitor for windows like cutecom that you used?
I wasn't using windows back then.
For windows you can use hercules, tera term or realterm
Good evening, would you like to carry out this project in firebase.
Tested this code long back and it worked. But on tssting the same SW, it gets stuck on the ESP_init() function. On debugging found out that its getting stuck on IsDataAvailable() function. What could be the issue? Appreciate your help
Same here. looking for help
Got it to work. first i checked getting started with esp8266 video. followed it everything worked. Then I double checked the code. Found an error hero make sure to comment.
/* USER CODE BEGIN USART1_IRQn 0 */
Uart_isr(&huart1);
/* USER CODE END USART1_IRQn 0 */
// HAL_UART_IRQHandler(&huart1);
/* USER CODE BEGIN USART1_IRQn 1 */
Also checked connection for RX TX and found an error there.
@@Wuzz7 did you find any solution?
Thanks for the video. And i have two questions. 1. the service Thingspeak is free one? 2. Can i use WizFi360 instead of ESP8266?
1. Most of it yes.
2. No. This is specifically written for AT commands in esp8266
@@ControllersTech Thank you for the answer. If i rewrite AT commands for WizFi360 it will start working properly? Do i need to change code in UartRingbuffer.c file besides in ESPDataLogger.c? Thank you.
@Controllers Tech Please answer my previous question about UartRingbuffer.c file. Thank you
@@user-rf5ik8ft3t WizFi360 also supports the same AT commands. I think it should work as it is . Give it a try. If it doesn't work, then debug your code, check where it is getting stuck, and then try to change those commands according to your device
@@ControllersTech WizFi360 works perfectly also, thank you for helping once more time. Do you have a video instruction how to parse the data read from thingspeak.com in json formatted text or are you going to make it sometime?
Hello Sir. Can real time data uploading be done only with stm32f746g disco board to the thingspeak server. If yes, can you please help out with it. Your videos are really helpful. Thankyou
This video explains it.. it's uploading in real time.
If you are talking about that 15 second delay, then that's because of the free account. If you don't want that restriction, you need to get the paid one..
@@ControllersTech Thankyou Sir for your valuable response. I have tried the same to upload temp values using esp8266 and Stm32f746g diacovery board. There is no error and I am getting temp values in live expression, but i am not seeing it in the cloud. Can you please help. Thankyou
I'm using STM32WL series custom board with Esp32 C3 mini is connected via uart. But I made the necessary changes according to your tutorial, my program got stuck on ESP_Init() function, therefore not going to the while loop.
ESP32 is itself another MCU. Here I have used the ESP8266 module. They are different.
@@ControllersTech What changes do I need to perform inside ESP_Init() function, Is there any possibility to make it work with your libraries?
@@ControllersTech I was looking into the ESP_Init() function and step into RingBuf_Init() and Also Uart_sendstring() function, it looks like only a single letter is for RingBuf_Init() like "a" even though it should be "abc" for "SSID" and "1" it should be "1e1" and for Uart_sendstring() sending only "A" not the "AT+RST
". What could cause this issue if you have any guideline that I could follow?
Sir ı have a bşg problem. I have been trying to solve it for a week but u couldn't. I wrote the same code on my stm32f429, but ı cant see the datas on thingspeaks server. I dont even see my adc value on stmstudio. Rx and Tx is correctly connected, ı double checked it. What is the problem ? I uploaded my esp to at commands also. It responds OK when ı write AT. What can ı do sir, please help me.
you need to debug your code and find errors. Just put breakpoints and check where the code is getting stuck.
PS: No code will work without debugging
Hello, I have exactly the same problem as you. Have you solved it?
Do I need to flash NodeMcu on ESP8266-01 first before go through this tutorial ?
No. Just get that esp8266... The cheaper module and it will work
@@ControllersTech Thank you. Will try it very soon for my project.
haaaaiiii,,, I have a problem where thingspeak only receive data 4 cycle only and get stuck,, when I Reset the STM32 than thingspeak receive the data again., can U help me please...
Have you solved this error?
Parabéns pelo exemplo, montei está funcionando perfeitamente!!
I tried implementing the same and do not see any output. Can you please let me how to set the buad rate of ESP8266?
Look at the first video in this playlist
@@ControllersTech Both my stm board and the esp8266 are at 115200 buad rate and still no output? Can you please help me how to move further?
Connection ? Tx to Rx and Rx to Tx right?
@@ControllersTech it worked. The reset on flash settings were disabled. Thank you so much for your support:)
Hi, thanks for the video, can you please tell me from where you've gotten those library files?
I wrote them myself 😮💨
@@ControllersTech where can I get them then? Can you send a link to all your libraries? I'm working with another video of yours too
It's all there on the website..
@@ControllersTech Ohh, thanks a loy
@@ControllersTech lot*
Nice video. Stm32 and send the data to the database by using sim800 could you?
I am intersting for that , Any help ,Thanks
there's implicit huart1 declaration in main.c and UartRingbuffer can't build the project any solutions to fix that
Enable uart in cubemx
@@ControllersTech already enabled and that's what causes an implicit declaration in main.c
Hi I got while(!(Wait_for("OK
"))); this problem how can ı solve this thanks
did you find any solution?
Nice videos, can you just log data to a text file on desktop?
You can use sd card or usb flash drive to log the dat. Later transfer to desktop
I am using esp8266mod the data returned is meaningless or "ready
". i didn't use extrnal power source i used stm32f4 discovrey 5V with ams1117 3.3v regulator but I didn't get the "OK" message
power it with 5V
@@ControllersTech thanks I’ll try
unfortunately this was not successful, I looked at the data in tx_buffer with usb ttl, they seem meaningless on the com port, I will work on it a bit, but I have no hope
@@ControllersTech okey I did it .I think problem is about usart1 I use usart2 and it worked.
multiple definition of `huart1'; error how to solve?
Put extern in front of it
From where i can get esp32 library and ring buffer library
Start reading the descriptions of tutorial videos..
Are u using MQTT protocol?
No
can you me connection between stm32 and esp82 ?
It is shown on the wepage linked in the description.
does it work with esp8266 nodemcu , if so how do i do the wiring
You need to flash the AT firmware on nodemcu.
For connection, just connect TX with RX and RX with TX
Thank you very much for the explanation @@ControllersTech
Hi !
Could you also show how to connect ESP8266 to Firebase
That's probably never going to happen, unless i have a lot of free time. Firebase library is huge.. and i don't have much understanding of the topic
@@ControllersTech
Hi @Controllers Tech, I am also trying to communicate with firebase but not getting any idea how handle authentication. If you give short idea it will be huge help. Thanks
Hi @Aditya Bhawkar did you find any solution?
I'm using stm32f0 processor so i have a problem with the uartringbuffer library. How can i solve this problem???
What's the problem
@@ControllersTech cant use that library bcs its calling stm32f4xx_hal.h. Can i rearrenge it for stm32f0
Yeah u have to change it According your controller.
@@ControllersTech how can i do that?
Just change f4xx with whatever header your controller supports
Esp files not present in the repo.
Check my other comment.
but you have used the node mcu, it has also one EN pin so like ESP8266-01 , we should make EN pin of node mcu high??
The nodemcu has been flashed with AT firmware and i only used the tx and rx pins from it. I didn’t check the EN pin, it might be high via internal connections
@@ControllersTech is node mcu is flashed by stm32 ??
No
@@ControllersTech but in your code,using UART you have sent AT commands to the node mcu!!
I said the nodemcu is flashed with AT firmware. So it behaves like an ESP8266 here.
Where can I get the library files ?
the ESPdatalogger.c and the rest
I want to do this project with ESP32. Can I use the same library?
This library is written for AT commands. If you want to use it, ypu need to use AT firmware on ESP32.. which is not a good idea
@@ControllersTech I saw STM32 projects using ESP32 on Git hub. There was a comment that the libraries used were written for arduino in h files.
Since there are too many libraries, I did not understand which one to use. Do you have any information about this topic?
Yeah STM32 can be used as Arduino. So you can use the Arduino libraries in Arduino IDE.
@@ControllersTech thank you for your help
@@ControllersTech Why isn't it a good idea on ESP32?
Does it work with esp 8266-01 ? i tried it didn't work :( no errors in compiling but nothing was sent to the platform (i already verified my wifi/password and my API KEY )
Yeah it works with 8266-01. Use debugger to find where it is stuck. This works in blocking mode, so if some expected result doesn't shows up, it will stuck there
@@ControllersTech and is it necessary to use bypass clock ? mine is 407VGTx,with 168Mhz.
It's stuck on ESP_Init("***", "****");
No it's not necessary. You can select external crystal also.
At which point in that function is it stuck ?
@@ControllersTech Here's my file(its a combination of ur dht tuto and this one ,i put 300 in the esp_send_data just to test )
www.mediafire.com/file/7sfi1bp5vu3e6mk/Dht_Esp.rar/file
I have the same problem as @Amine Faker. Its stuck on the Wait_for() function. And inside of the Wait_for() function, its stuck on IsDataAvailable() function.
after which step ? I mean after sending AT, or which command ? Also if you ware debugging, don't do step overs. Instead set breakpoints and check the rx_buffer
@@ControllersTech I have solved it. For some reason it doesn't work with the uart1 (it can't receive date), so I use the uart2. Thank you.
@@xulinqiu1997 are u using usart2? I have some problem
@@alperenerdogan4602 yes, what problem?
@@xulinqiu1997 same problem same soluotion :) i have solved it. Ty
How can i do it with the ESP32?
flash AT firmware first, then the code will work
Hi! do you manage to do it with ESP32?
@@ControllersTech can i ask how to flash AT firmware? and what will you use?
I wish u will be toturial about cloudmqtt.com !!!
Can i get the circuit diagram 🙏 please
Link to the post is in the description