Digistump Forums
The DigiX => DigiX Support => Topic started by: bonehead_1963 on June 24, 2014, 01:09:47 pm
-
Hi All,
First post as have very recently received my DigiX.
I am trying to get a webpage served from the DigiX and have followed the WiFi setup on the wiki. At the moment I have the board in AP+STA mode with a local IP on STA and can access the settings page from home WiFi. AP has a different IP and still using the DIGIX SSID. I can access the settings page via those settings.
My problem is that I have uploaded a sketch from a previous thread to show pin status and after watching the serial say it's started OK, if I then put in the IP in the browser all I get is the settings page again.
Probably me showing complete ignorance of what I should be doing but any help appreciated.
Ian
-
ip:8080 for your web page
-
Thanks, tried that a few times but nothing yet.
How long would you expect to wait for the page to appear as after a couple of resets and reloads it's now sitting there with the waiting for response whirly thing going?
-
Upload this code to digiX board (select board digistump Digix {standard}).
if yo get an ip address in the Serial Monitor window. and then you type ip:8080 and get nothing migth be a router setting. the port might be block.
#include <DigiFi.h>
DigiFi server;
void setup() {
Serial.begin(9600);
server.begin(9600);
//DigiX trick - since we are on serial over USB wait for character to be entered in serial terminal[pre][left][/left][/pre]
while(!Serial.available()){
Serial.println("Enter any key to begin");
delay(1000);
}
Serial.println("Starting");
Serial.println("wifi inited");while (server.ready() != 1)
{
Serial.println("Error connecting to network");
delay(15000);
}
Serial.println("Connected to wifi!");
Serial.print("Server running at: ");
String address = server.server(8080);//sets up server and returns IP
Serial.println(address);
}
void loop() {
if ( server.serverRequest()){
server.serverResponse("<body>Hello</body>");
}
}
-
Hi,
Thanks for that. It did finally work after several resets and quite a long delay in page loading.
Now if I can just get it to serve a file from the SD card......
Cheers,
Ian