hi I am having a hard time trying to understand this error message, it says missing library, but i Am unsure which library to reinstall. I have tried to reinstall the arduino agent, I havve also tried using the online version of arduno create, but the same error message appeared.. this is the error message "Arduino: 1.8.19 (Mac OS X), Board: "Arduino Uno"
Arduino: 1.8.19 (Mac OS X), Board: "Arduino Uno"
fork/exec /Users/AryanGorai/Library/Arduino15/packages/arduino/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++: no such file or directory
Error compiling for board Arduino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
the code:
#include <SPI.h>
#include <Ethernet.h>
const int SENSOR_PIN = 8;
int lastState = LOW; // the previous state from the input pin
int currentState; // the current reading from the input pin
int temp;
int temp1;
int pintemp = A1;
char mystring[] = "The sensor is being touched";
int buttonPin = 2;
int buttonState = 0;
int buttonPin1 = 4;
int buttonState1 = 0;
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xEF, 0xED};
EthernetServer server (80);
String readString;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Ethernet.begin(mac);
server.begin();
Serial.print("Server is at ");
Serial.println(Ethernet.localIP());
pinMode(SENSOR_PIN, INPUT);
pinMode(pintemp, INPUT);
pinMode(buttonPin, INPUT);
pinMode(buttonPin1, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
int temp = analogRead(pintemp); //Read the analog pin
temp = temp * 0.48828125; // convert output (mv) to readable celcius
Serial.print("Temperature: ");
Serial.print(temp);
Serial.println("C"); //print the temperature status
temp = temp1;
buttonState = digitalRead(buttonPin);
buttonState1 = digitalRead(buttonPin1);
EthernetClient client = server.available();
if (client) {
while (client.connected()) {
if (client.available()) {
char c = client.read();
Serial.print(c);
readString += c;
if (c = '\n') {
Serial.print(readString);
client.println("< HTTP / 1.1 200 OK >");
client.print("<Connection-Type: text/html>");
client.println("<Connection: close>");
client.println("");
client.println("<!DOCTYPE html>");
client.println("<html>");
client.println("<head>");
client.println("<title>HTML Website for Arduino!</title>");
client.println("<h1 style=text-align:center>HTML Website for Arduino!</h1>");
client.println("<head>");
client.println("<body>");
client.println("<body style='background-color:powderblue;'>");
client.println("<p></p>");
if (currentState == 1){
client.println("<p>The sensor is being touched!</p>");
}
if (currentState == 0){
client.println("<p>The sensor is not being touched!</p>");
}
if (buttonState == HIGH) {
client.println("<p>The red button is being pressed!</p>");
}
if (buttonState == LOW) {
client.println("<p>The red button is not being pressed!</p>");
}
if (buttonState1 == HIGH) {
client.println("<p>The yellow button is being pressed!</p>");
}
if (buttonState1 == LOW) {
client.println("<p>The yellow button is not being pressed!</p>");
}
client.println("<a href=\"/?button1on\"\"><button>Check last button pressed!</button></a>");
client.println("<a href=\"/?button2off\"\"><button>Check Temperature!</button></a>");
client.println("<body style=background-colour:powderblue>");
client.println("<p></p>");
delay(1);
client.stop();
if (readString.indexOf ("?button1on") > 0) {
Serial.println("LED on");
}
if (readString.indexOf ("?button2off") > 0) {
Serial.println("LED on");
}
}
}
}
}
currentState = digitalRead(SENSOR_PIN);
if(lastState == LOW && currentState == HIGH)
Serial.println("The sensor is being touched");
lastState = currentState;
}