We’re rewarding the question askers & reputations are being recalculated! Read more.
58

You shouldn't have any issues keeping it on all the time, however, some thing to consider is any counters you may have, like the use of millis(). From the Arduino docs on millis: This number will overflow (go back to zero), after approximately 50 days. So for projects that are on for long periods of time, you may not see an issue immediately but ...


33

A couple of things to keep in mind (outside of @Sachleen's mention of millis()): Like any electronics, heat can be disruptive. The micro-controller itself isn't likely going to be a huge issue from the perspective of heat, but other components like the power supply might cause issues. If your code uses EEPROM.write(), be aware that the EEPROM in your Uno'...


12

Keep in mind that the flash and EEPROM have limited lifetimes (about 10,000 and 100,000 write cycles respectively) so if you're doing a lot of writing to those, they may become corrupted. In a test I did, an external EEPROM took about 3 days to start becoming corrupted.


10

Running the Arduino 24/7 Shouldn't be a problem. But be sure that you have a case that allows for ventilation and you keep it in a well ventilated area. Just like computers, if you do not keep them in an environment that can keep them cool, they will not stay cool. Server load also should be a thing to consider, the more load there is on the server the ...


9

I am working on similar project that uses internet to communicate with external device (mobile). I am reading data from sensors and passing them over the web with web sockets. I am using Arduino Yun for this project and Spacebrew (for web sockets communication). It's very interesting approach but quite a challenge in some cases. You will probably run into ...


8

We've been running our Arduino-based RFID access system at Bloominglabs Hackerspace in Bloomington IN since late 2011 and aside from a couple power outages and software updates it runs around the clock, no problem. More recently we added a networked thermostat, same deal - it's running round the clock.


8

Well, for fast parsing I wouldn't use String for a start. I've written an example (below) which does away with the String class, and also demonstrates parsing the line once. #include <SPI.h> #include <Ethernet.h> // Enter a MAC address and IP address for your controller below. byte mac[] = { 0xB3, 0x8D, 0x72, 0x1D, 0xCE, 0x91 }; // Our IP ...


6

Arduinos can run without issues for a really long time, though depending on local conditions and the intensity of computation you may have to attach heat sinks. In addition, keep it well ventilated. It depends on the program being used, too, if your server is serving a page every now and then, it shouldn't be an issue, but if you expect constant traffic ...


5

It looks like you can use the send_P function to send raw PROGMEM data: void send_P(int code, PGM_P content_type, PGM_P content, size_t contentLength); I.e., (from what I can gather): PGM_P favicon = { 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x10, 0x10, 0x00, 0x00, 0x01, 0x00, 0x18, 0x00, 0x68, 0x03, 0x00,......... 0x00 }; server.send_P(200, "image/x-...


5

I2C does not automatically share resources between two connected devices. You would not be able to share an Internet connection from a Mega connected via I2C to another Mega which has an Ethernet shield. However, you could write code for both Megas that implements a two-way communication in which the non-shield Mega sends requests or commands to the one ...


5

Add the CORS header to every response, not only for 'preflight' OPTIONS request. The OPTIONS support is optional, but the response returning the 'shared resource' must contain the CORS header "Access-Control-Allow-Origin: *"


4

I built a simple power monitor with my first Arduino. It is powered via USB from a web-server that in turn is powered via a quite substantial battery backup (which does not have notification abilities). It is also connected to a mobile phone charger plugged into a non-UPS power socket. So if the power dies the Arduino sends a message to a little program ...


4

I'd like to mention an issue that doesn't come up very often but can cause long term issues. Memory Leaks and Heap Fragmentation. Almost nobody mallocs in embedded stuff, but if you do, do it right.


4

I've never ran an Arduino for that long, but there shouldn't be a problem. One thing to watch out for is the input voltage. While an Arduino is capable of handling 7-20v as input anything over 12v can overheat after longer periods of time and cause board damage. As a quick recommendation to avoid any overheating of the Arduino I would keep the voltage as ...


4

It looks like you did not send the HTTP headers. Before sending any of the HTML content send following lines: "HTTP/1.1 200 OK\r\n" "Content-Type: text/html\r\n\r\n" Make sure you send all the \r\n !


4

You need to keep track of multiple WiFiClients - declare an array of them, for example, and each time server.available() gives you a new one, store it in the array. Then you need to make sure your code doesn't stick waiting for data from each item. You could service each WifiClient in turn: if it has data waiting (client[i].available() is true), read the ...


3

You can use an Arduino Yun: it has a 32u4 microcontroller coupled with a cpu running linux. The linux side already has a webserver: together with the Bridge library, you can use REST-like APIs to control a sketch, or build a web app that uses that APIs. One example of remotely control an Arduino (although using an Android app instead of html+js) is this. ...


3

What arduino board is being used? I find that some webserver code takes up a lot of the SRAM and in an UNO this leaves very little space for other code. To save SRAM use the F macro on all the Serial.print statements that have quoted text. i.e: Serial.print("Some text you want output"); This takes up SRAM when running. 1 byte per letter and space. Serial....


3

This is quite a huge topic to cover in one answer, but I will do my best. The NodeMCU can be used in three distinctly different ways. First is the AT mode, where you have installed the AT firmware. In this mode the NodeMCU is purely a slave device to the Arduino. Once you have got the Arduino to configure the NodeMCU in the right way to receive data on a ...


3

Here's a major problem: void loop() { uint8_t i; float average; float average_two; float average_three; float stuckintime; for (i = 0; i < NUMSAMPLES; i++) { samples[i] = analogRead(THERMISTORPIN); samples_two[i] = analogRead(THERMISTORPIN2); samples_three[i] = ...


3

This line: if (client.connect(server,80 && LED == HIGH)) { is definitely not going to do anything useful. Nor is this line: else if(client.connect(server,80 && LED == LOW)) { In both lines you're take the logical AND of the number 80 and the result of testing the LED. Put the closing parenthesis in correct place: if (client.connect(...


3

The esptool auto-reset feature by default sets io 0 LOW over the RST line and then makes a reset over the DTR line to put the esp8266 into flashing mode. After the upload the esptool resets the board over the DTR line. On this board Mega+WiFi, only the DTR line is wired like for AVR MCU. For flashing the io 0 pin is put LOW with the pin 7 of the DIP switch ...


3

When the client sends you a request, you should answer only once. Your root() function attempts to answer twice whenever the request contains the argument “duty”. The client will not handle a duplicate response to a single request. Here is your root() function: void root() { iso(); ser.send(200, "text/html", iso()); // ← first response if (ser....


2

You need to determine what the network address is of the LAN you have connected the arduino to. A router can often give you this information. Alternatively you can connect a computer to the same network and look at the computers network settings (this varies depending on what OS you use). Then you have determine what IP address is available on that network. ...


2

You have to disconnect before being able to connect again otherwise the controller will crash due to memory starvation. Every connect you do takes some memory to register state information. Not sure of the exact commands involved, but it'd look a bit like this: if (client.connect(server, port)) { ....... client.disconnect( .... ); ...


2

You are reading the input pin float PPG = analogRead(A7); only in the startup code of your program. Move that into the loop to have it updated before using it.


2

The capacitor in the sample-and-hold circuit in the ADC frontend is tied to ground and it is very leaky. Unless you have a low or medium impedance output connected to it, you will always read the ground value. An antenna is a very high impedance device.


2

Here is what I found: You need to have a special character like "*" (a delimiter), from which important data will flow through. char z = '*'; int s=0; void setup() { // usual initialization } void loop() { if (client.available()) { char c = client.read(); // Serial.print(c); if (z == c) { s=1; } if(s == 1) { ...


2

Bluetooth generally support only one to one connection. Atmost 6 bluetooth can be connected to single module in latest bluetooth version(the basic model probably used by you connects only 1 device). Hence it is not a good idea to use bluetooth. Also if you need a web based platform you should switch to some more powerful platform like raspberry pi, beagle ...


2

Yes, it is perfectly possible. you just have to look at the right bits. Fundamentally there is no difference between an Arduino and any other website, it's just somewhat simpler in how it operates. All browsers follow the same rules - if they didn't they wouldn't work on the web. Two of the rules you are interested in are: Browsers identify themselves ...


Only top voted, non community-wiki answers of a minimum length are eligible