http get


I am connecting to a webserver and getting an answer with the right data. I want to use some of the returning characters as input for a pwm led driver. For that to work, I have to extract the relevant data from the input and turn them into an integer. It is the valuebetween < and> in the monitor. How can I do that? Where can I best look for an answer?
What might help is if I would not get the content type etc. text back every time. I guess that has to do with the syntax of the GET message. Does anyone have a suggestion for me for that?
I attached a screenshot of the monitor output.
Thanks, Jan.

/*written for nano33 IoT
  First Serial is started, then WIFI.
  A connectio0n is made to server "tuin",
  and every 5 seconds a http request is sent.
  The lux level is answered.
  This is stored as a CHAR CHAR and printed on the serial monitor

#include <SPI.h>
#include <WiFiNINA.h>

char ssid[] = "PBL";          //  your network SSID (name)
char pass[] = "xxxxxxxxxx";   //  your network password

int status = WL_IDLE_STATUS;
IPAddress tuin(192,168,2,121);  // remote server we will connect to
WiFiClient client;

void setup() 
  while (!Serial) 
  Serial.print("Attempting to connect to WPA network ");
  Serial.print("SSID: ");

  status = WiFi.begin(ssid, pass);  
  if ( status != WL_CONNECTED) 
  Serial.println("Connected to wifi");
  Serial.println("Starting connection to server");   
void loop()
  client.connect(tuin, 80); 
  client.print("GET /control/rcontrol?action=gettext&message=<$(SEN.LXL)>\n");
  while (client.available()) 
  char c =;

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.