I am a beginner in arduino and I wanted to know if I can upload the sketches to the Arduino Ethernet via network without connecting to my system using USB connector.
I want to connect to the transistor and control my lamp via network .
Maybe you could give a more detailed description ?
what does "connect to the transistor and control my lamp via network" mean exactly ?
But I'm afraid you take it the wrong way : the sketch has to be written to behave as you want it to behave, and it won't change each time you want to switch on/off the lamp.
You write it, upload it, test and debug it, and upload the good version, and it stays on the arduino.
Tell me if I'm wrong, but I think you want to be able to control from the web, a lamp that is connected to your arduino, which has a ethernet shield ?
Then I think you should have a close look here Ethernet - Arduino Reference .
Then you'll have to create a server (say on the arduino) wich will send and receive datas from the client (on your PC connected to the web), and make some actions depending on the datas it receive from the client.
I'm not a web designer then I can't really explain more than that, but that's the idea.
You'll have to look at apache, php and web design
I guess, and I hope other members will help more than I did.
I am now clear that the ardino board cant work without USB connection to the System.It means i write the sketch assigning the ip address of the arduino board and remove the USB ,so that I can connect to the arduino board via network from any client be it web browser.Is it possible to run my sketches on the ardunio board with only my ethernet cable conected not my USB to the system?.Correct me if I am wrong.
The second thing about the transistor.I meant to say that my Arduino board will turn on and turn off my lamp with respect to the command request given from the web browser.I thought that I can use a transistor so that it acts as a switch to turn on and off my lamp .Is this possible?
Is it possible to run my sketches on the ardunio board with only my ethernet cable conected not my USB to the system?.Correct me if I am wrong.
sure, it doesnt' need to be connected to the usb, but it needs a power supply . The ethernet cable doesn't provide it.
I can use a transistor so that it acts as a switch to turn on and off my lamp .Is this possible?
I assume your lamp is on 220V ?
You may use a transistor, but only to switch on/off a relay, or an opto-triac (in this case, no transistor needed ) , which will actually switch on/off the lamp .
Sorry, I forgot to mention it, but there are ethernet shields with PoE , and even PoE (Power over Ethernet) modules !
With these shields or modules, no need for an external power supply
So the USB connections are only for power supply or the USB connections are also to upload the sketches from the system.with POE is it possible to upload the sketches to the board.
That was my question before I asked.
The usb connections are mainly for uploading the sketches on the board , and debugging, via the serial monitor.
They also give the power to the board, so that you do not need an external power source while programming.
PoE only allows the arduino to take the power from the ethernet cable, nothing more .
And no, I don't see how you could upload sketches to your arduino via the ethernet connexion.
here is what I usually do :
while programming/debugging, the arduino is connected to the PC via the USB port, and the ethernet shield on it is connected to my box.
once the sketch is OK, I remove the USB cable, and use an external power supply for the arduino (I don't have a PoE module)
In theory you could probably build something that can upload new sketches over the network, presumably using a second device to act as the programmer and which acts as an ethernet to serial device.
In the grand scheme of things it is probably easier to hook a Rasberry Pi, Beaglebone Black, or pcDuino to the network, run Linux, and use ssh to log into the system to modify the programs, than it would be to build a method to download programs via the network. Or use the Linux machines to run the IDE remotely and hook up the Arduino to those machines, that can be reprogrammed via the USB/FDTI cables.
In looking at your request however, I think you probably don't want full fledged reprogramming. Instead you just want to control various parameters via the network. That is simpler than trying to reprogram the whole thing. You could make a little web server that puts up a simple screen with toggle/slidder switches.
What you want to do is step back, and clearly identify what you want controlled, down to what types of control you want and how much automation is involved in the program. At the moment, you seem to be just hand waving on what you want. You need to break it down into smaller pieces so you can work on each piece, rather than trying to get the whole development done all at once.
Thank for the reply MichaelMeissner.
maybe I have not explained property.
I have a about ten Arduino Mega 2560 located in a production environment, which detect digital inputs of turn on and signal lamps. Any have the Ethernet Shield Arduino Mega, and send-receive data with the client PC through Socket.
My need is to be able to upload the sketch remotely from one PC through the network, in order to make changes to the program remotely, without necessarily go by the customer.
I hope I have given all the information needed to understand my needs.
thanks a lot
ambro7:
Thank for the reply MichaelMeissner.
maybe I have not explained property.
I have a about ten Arduino Mega 2560 located in a production environment, which detect digital inputs of turn on and signal lamps. Any have the Ethernet Shield Arduino Mega, and send-receive data with the client PC through Socket.
My need is to be able to upload the sketch remotely from one PC through the network, in order to make changes to the program remotely, without necessarily go by the customer.
I hope I have given all the information needed to understand my needs.
thanks a lot
Sure, but bear in mind Arduinos aren't built to be uploaded from the network. One solution that occurs to me is to have a second processor that sits on the network that can start the reload process on the Arduino.
The sparkdevices are set up to load over the internet. It was a kickstarter campaign, that just closed. It looks like they will start shipping to non-kickstarter backers in October: http://www.sparkdevices.com/#
As I said, another solution is not to run an embedded board, but run an operating system like LInux. Then you just reprogram the app that you want to replace, either by logging into the system, or use scp to copy in a new file (and having an app restart itself after you have moved the file over). I do this all of the time for my work computers, where the main computers I'm using are over 1,000 miles away. Here you have to readjust your programming somewhat to work within a Linux system. Linux doesn't tend to be as good at hard realtime as a machine where you directly control everything, but a lot of times embedded processors are just waiting for the next input, and could tolerate some delays.
I was wondering if it'd be possible to adjust a sketch via the webserver page. So if a temp probe dies (the one wire has a unique code for each temp probe), a new one can be hooked up, and somebody can remotely alter parts of the sketch via the webpage. (or change certain parts of the sketch, so a box somebody can type in, and it'll change preset parts of the sketch).
I don't know there are any way allow modify sketch during run time, however there is some type workaround.
Plan A.
TFTP Bootloader, With this and an Ethernet shield, it’s easy to upload code to any Internet-connected Arduino, whether it’s on your desk or halfway across the world. webserver create correct file and save it at TFTP server.
ambro7:
I have a about ten Arduino Mega 2560 located in a production environment, which detect digital inputs of turn on and signal lamps. Any have the Ethernet Shield Arduino Mega, and send-receive data with the client PC through Socket.
My need is to be able to upload the sketch remotely from one PC through the network, in order to make changes to the program remotely, without necessarily go by the customer.
You may be able to achieve most of that by designing your sketch with configuration parameters which can be modified via the Ethernet interface, without requiring you to upload a new sketch each time you change something. Your Arduino includes a small amount of EEPROM storage which can be used to store configuration values, and it would not be difficult to load the parameters from the EEPROM at startup and then provide a means to update and store them subsequently in response to commands received over Ethernet. For example you could host a small web server providing a form to display/alter the parameters, or provide a web service that was accessed via a web server elsewhere, or use bitlash or similar to provide a textual interface over TCP/IP.