Quote:
Originally Posted by jwoody
The above code is all I am using. All I have been doing is uploading the above code, and then just resetting the arduino. Then I upload the dome firmware.
Once I upload the eepromclear sketch is there a command in the serial monitor I should use to execute the code or just resetting should do the trick?
I did suspect that I wasn't properly executing the eepromclear sketch but I am still not sure.
Thank for your help
|
Bear with me as I'm trying to piece together what you are actually doing.
OK, from what I can see from the link to that code is a complete program for running the dome etc, and it was programmed very professionally using Visual Studio 2017 & Arduino plugin, and then downloaded to the Arduino. It's quite in depth.
So step 1 would be to download this code/firmware to the Arduino to get dome control, (forgetting about the rain sensor for now). Is that correct?
The next step is to add the rain sensor code in a way that it works with the already downloaded code, Is that correct?
If both the above are correct then it appears that you have 2 programs, one for the dome, and the other for the rain sensor, is that correct?
If so, and you are using 1 Arduino then there is one of your issues.
You can only download 1 program to the Arduino at any given time, so it is either the dome code, or it is the rain sensor code.
What you need to do, I think at this stage, is edit the Visual Studio/Arduino code and add your working rain sensor code to that and then download the 1 program to the Arduino.
If you have downloaded the dome code and then you download the rain sensor code, then you are overwriting the dome code with the rain sensor code.
I'm just trying to piece together what you are doing and at this stage, it looks like the above. Your clarification will help.
Are you using 1 or 2 Arduinos?
Resetting an Arduino to make code work and run once is NOT the way to program these devices, but hey, depending on the project maybe so, but I don't think in your case. I still need to understand all you are doing.
I can show you how to call code to reset the eeprom's values to 0 within your program by adding some things in the loop section but first I need to know more.
So, at this point, going on what you have said so far, it looks like you have 2 separate programs, 1 Arduino and a bunch of sensors etc. Is that correct?
I'm sure we will get to fully understand what you are wanting to do and it is either a lot simpler than I think at the moment or it might be an extreme learning curve for you.
Happy to chat on the phone to save on typing if you want. :-)
Cheers,
Damien