cancel
Showing results for 
Search instead for 
Did you mean: 

how to send integer number from http webserver to stm32 micro controller using httpd

abeba.1
Associate III

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

 

6 REPLIES 6

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 that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

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


@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 that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
Pavel A.
Evangelist III

How about web sockets

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

hii thanks a lot for help :)