how to send integer number from http webserver to stm32 micro controller using httpd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-15 1:34 AM
hii everyone
i would like to send an integer number that i get from the user on html webpage to the stm32 controller
lets say in the controller i just want to print the number that received from the webpage
what is the method that i need to use in order to receive an integer number from a web page
i saw once a method to send a string called CGI but i need to transfer an integer number not a char or a string how can i do this
- Labels:
-
STM32F7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-12 6:45 AM - edited ‎2025-05-13 12:58 AM
Surely, HTML is inherently text based?
(the clue is in the name - the 'T' stands for "Text")
So everything is just a char or a string.
It's not difficult to convert from a char or string to a number - there are standard library functions for that ...
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-14 12:28 AM
hii thanks for your help can you give me the name of the library to use and the function to the conversion fro char to integer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-14 1:04 AM
@abeba.1 wrote:function to the conversion fro char to integer
Go on - it's in the Standard C Library.
See any C reference or textbook; eg, https://en.cppreference.com/w/c/string/byte
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-14 10:50 AM
How about web sockets?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-14 11:03 AM
Perhaps look at atoi() or sscanf() ?
The conversion is pretty basic stuff, using decimal math.
Perhaps look more broadly at text and string handling and parsing.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-05-15 12:55 AM
hii thanks a lot for help :)
