Hello everyone I’m new here and would really like if someone could help me out.
I’m building this project right here: http://www.instructables.com/id/LED-Glass-Desk-v20/step4/The-Software/
So I finished the hardware soldering and mounted it to a board but I’m hitting a error in the coding.
#define WEBDUINO_FAIL_MESSAGE “NOT ok\n”
#include “SPI.h”
#include “avr/pgmspace.h”
#include “Ethernet.h”
#include “WebServer.h”
#include <Adafruit_WS2801.h>/*** This is what you will almost certainly have to change ***/
// WEB stuff
static uint8_t mac = { 0x90, 0xA2, 0xDA, 0x0E, 0xCC, 0x0A }; // update this to match your arduino/shield
static uint8_t ip = { 192, 168, 0, 0 }; // update this to match your network// LED Stuff
int dataPin = 2; // Yellow wire on Adafruit Pixels
int clockPin = 3; // Green wire on Adafruit Pixels
#define STRIPLEN 60
#define Adafruit_WS2801 strip = Adafruit_WS2801(STRIPLEN, dataPin, clockPin, WS2801_GRB);
int defaultPattern = 0;// LED Grid stuff
int max_x = 11;
int max_y = 4;// ‘graph’ style x,y where 0,0 is bottom left
int grid[STRIPLEN] = {
4,5,14,15,24,25,34,35,44,45,54,55,
3,6,13,16,23,26,33,36,43,46,53,56,
2,7,12,17,22,27,32,37,42,47,52,57,
1,8,11,18,21,28,31,38,41,48,51,58,
0,9,10,19,20,29,30,39,40,49,50,59
};// ‘screen’ style x,y where 0,0 is top left
/*
int grid[STRIPLEN] = {
0,9,10,19,20,29,30,39,40,49,50,59,
1,8,11,18,21,28,31,38,41,48,51,58,
2,7,12,17,22,27,32,37,42,47,52,57,
3,6,13,16,23,26,33,36,43,46,53,56,
4,5,14,15,24,25,34,35,44,45,54,55
};
*//*** Things you might want to change ***/
// basic web auth, not super secure without https
// see example at GitHub - sirleech/Webduino: Arduino WebServer library
// use auth?
#define AUTH 0
// credentials (in base64 user:pass)
#define CRED “dXNlcjpwYXNz”WebServer webserver("", 80); // port to listen on
// ROM-based messages for webduino lib, maybe overkill here
P(ok) = “ok\n”;
P(noauth) = “User Denied\n”;// max length of param names and values
#define NAMELEN 2
#define VALUELEN 32/*** Below here shouldn’t need to change ***/
void log(char * input) {
if (1) {
Serial.println(input);
}
}// LED support functions
// create the “Color” value from rgb…This is right from Adafruit
uint32_t Color(byte r, byte g, byte b) {
uint32_t c;
c = r;
c <<= 8;
c |= g;
c <<= 8;
c |= b;
return c;
}// create a “Color” value from a hex string (no prefix)
// for example: ffffff
uint32_t hexColor(char * in) {
return strtol(in, NULL, 16);
}//Input a value 0 to 255 to get a color value.
//The colours are a transition r - g -b - back to r
uint32_t Wheel(byte WheelPos) {
if (WheelPos < 85) {
return Color(WheelPos * 3, 255 - WheelPos * 3, 0);
} else if (WheelPos < 170) {
WheelPos -= 85;
return Color(255 - WheelPos * 3, 0, WheelPos * 3);
} else {
WheelPos -= 170;
return Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
}// set all pixels to a “Color” value
void colorAll(uint32_t c) {
for (int i=0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, c);
}
strip.show();
}// set all pixels to a “Color” value, one at a time, with a delay
void colorWipe(uint32_t c, uint8_t wait) {
for (int i=0; i < strip.numPixels(); i++) {
strip.setPixelColor(i, c);
strip.show();
delay(wait);
}
}// fade from one color to another: UNFINISHED
void fade(uint32_t c1, uint32_t c2, int wait) {
if (c1 < c2) {
while (c1 < c2) {
colorAll(c1++);
delay(wait);
}
} else {
while (c1 > c2) {
colorAll(c1–);
delay(wait);
}
}
}
------------to much code for post----------------------------
I keep getting error where the bold is it says “string not defined in this scope”
I’ve been messing with this code for a while and would greatly appreciate any help I can get.
Thanks Anthony.