Webpage

Hello everyone, I am creating a webpage for my solar system, everything works and I am satisfied with my work. Now I would like to add some features and view the values of my system in real time only I realized that I have no more space on the web page. Is there the possibility to create more scrolling pages?
For example page 1 control and page 2 display?
I looked on the internet but I can't find anything, would someone more experienced help me?

I put my working program in the attachments, maybe it could be useful for someone... :slight_smile:

ImpaginazioneONOFFPerTelefono-20200306T231421Z-001.zip (1.59 KB)

You can link web pages from another server. You can also put them on external memory such as FRAM, SD Cards etc. Not all pages displayed have to be on your machine. You can use the print F macro. Serial.Print(F("Hello")); This will save RAM.

"I realized that I have no more space on the web page. Is there the possibility to create more scrolling pages?"

Is this an issue in serving up a page that is too big for the arduino to serve, or an issue in displaying the page in a web browser?

Is there the possibility to create more scrolling pages?
For example page 1 control and page 2 display?
I looked on the internet but I can't find anything, would someone more experienced help me?

yes, you can have more pages on your webserver.

If you aren't afraid of using google translater, you can have a look on this page:
https://werner.rothschopf.net/202001_arduino_webserver_post.htm

at the end of the page you find a link to a sketch.

After studing the existing code, add something like

else if (!strcmp(uri, "/2.htm")
  sendPage2(client);

and create your new sendPage2() function.
Link vice versa your "homepage" and 2.htm and your done.

What kind of board are you using? Do you have a SD card reader?

It's relatively easy to serve pages from an SD card, I wrote a web-server to do so for my gate controller.

Yet Another Arduino Web Server - YAAWS

It'll run on an UNO, but not much room for anything else. A MEGA works fine for it.

/*
  SD card test

  This example shows how use the utility libraries on which the'
  SD library is based in order to get info about your SD card.
  Very useful for testing a card when you're not sure whether its working or not.

  The circuit:
    SD card attached to SPI bus as follows:
 ** MOSI - pin 11 on Arduino Uno/Duemilanove/Diecimila
 ** MISO - pin 12 on Arduino Uno/Duemilanove/Diecimila
 ** CLK - pin 13 on Arduino Uno/Duemilanove/Diecimila
 ** CS - depends on your SD card shield or module.
 		Pin 4 used here for consistency with other Arduino examples


  created  28 Mar 2011
  by Limor Fried
  modified 9 Apr 2012
  by Tom Igoe
*/
// include the SD library:
#include <SPI.h>
#include <SD.h>

// set up variables using the SD utility library functions:
Sd2Card card;
SdVolume volume;
SdFile root;

// change this to match your SD shield or module;
// Arduino Ethernet shield: pin 4
// Adafruit SD shields and modules: pin 10
// Sparkfun SD shield: pin 8
// MKRZero SD: SDCARD_SS_PIN
const int chipSelect = 4;

void setup() {
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only
  }


  Serial.print("\nInitializing SD card...");

  // we'll use the initialization code from the utility libraries
  // since we're just testing if the card is working!
  if (!card.init(SPI_HALF_SPEED, chipSelect)) {
    Serial.println("initialization failed. Things to check:");
    Serial.println("* is a card inserted?");
    Serial.println("* is your wiring correct?");
    Serial.println("* did you change the chipSelect pin to match your shield or module?");
    while (1);
  } else {
    Serial.println("Wiring is correct and a card is present.");
  }

  // print the type of card
  Serial.println();
  Serial.print("Card type:         ");
  switch (card.type()) {
    case SD_CARD_TYPE_SD1:
      Serial.println("SD1");
      break;
    case SD_CARD_TYPE_SD2:
      Serial.println("SD2");
      break;
    case SD_CARD_TYPE_SDHC:
      Serial.println("SDHC");
      break;
    default:
      Serial.println("Unknown");
  }

  // Now we will try to open the 'volume'/'partition' - it should be FAT16 or FAT32
  if (!volume.init(card)) {
    Serial.println("Could not find FAT16/FAT32 partition.\nMake sure you've formatted the card");
    while (1);
  }

  Serial.print("Clusters:          ");
  Serial.println(volume.clusterCount());
  Serial.print("Blocks x Cluster:  ");
  Serial.println(volume.blocksPerCluster());

  Serial.print("Total Blocks:      ");
  Serial.println(volume.blocksPerCluster() * volume.clusterCount());
  Serial.println();

  // print the type and size of the first FAT-type volume
  uint32_t volumesize;
  Serial.print("Volume type is:    FAT");
  Serial.println(volume.fatType(), DEC);

  volumesize = volume.blocksPerCluster();    // clusters are collections of blocks
  volumesize *= volume.clusterCount();       // we'll have a lot of clusters
  volumesize /= 2;                           // SD card blocks are always 512 bytes (2 blocks are 1KB)
  Serial.print("Volume size (Kb):  ");
  Serial.println(volumesize);
  Serial.print("Volume size (Mb):  ");
  volumesize /= 1024;
  Serial.println(volumesize);
  Serial.print("Volume size (Gb):  ");
  Serial.println((float)volumesize / 1024.0);

  Serial.println("\nFiles found on the card (name, date and size in bytes): ");
  root.openRoot(volume);

  // list all files in the card with date and size
  root.ls(LS_R | LS_DATE | LS_SIZE);
}

void loop(void) {
}
[code]
The error message is as follows:
[code]Initializing SD card...initialization failed. Things to check:
* is a card is inserted?
* Is your wiring correct?
* did you change the chipSelect pin to match your shield or module?

I tried to change SD card, I changed from the Ethernet module to the normal SD module but the problem is always the same.

Can somebody help me? What more can I do? Change the Ethernet card?

@mozzini97

Other post/duplicate DELETED
Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Continued cross posting could result in a time out from the forum.

Could you take a few moments to Learn How To Use The Forum.
It will help you get the best out of the forum in the future.
Other general help and troubleshooting advice can be found here.