Skip to content

Instantly share code, notes, and snippets.

Created March 19, 2017 03:42
Show Gist options
  • Save anonymous/56acc710d13c3aa13ccb800ad6c15ca8 to your computer and use it in GitHub Desktop.
Save anonymous/56acc710d13c3aa13ccb800ad6c15ca8 to your computer and use it in GitHub Desktop.
webserver
server.begin();
server.on("/",[]()
{
server.send(200, "text/html", page);
});
server.on("/LED", []()
{
num = server.arg("msg").toInt();
if (num == 0 || num == 1 || num == 2 || num == 3 || num == 4 || num == 5 || num == 6 || num == 7 || num == 8 || num == 9)
{
int i, k;
for (i = 0; i < COL; i++)
{
for (k = 0; k < ROW; k++)
{
pixel[num][i][k] = number[num][i][k];// let pixel work on the the number which depends "changeNumber"
}
}
}
else
{
int i, k;
for (i = 0; i < COL; i++)
{
for (k = 0; k < ROW; k++)
{
pixel[10][i][k] = number[10][i][k];// let pixel work on the the number which depends "changeNumber"
}
}
}
server.send(200, "text/html", page);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment