⚠️ This forum has been restored as a read-only archive so the knowledge shared by the community over many years remains available. New registrations and posting are disabled.

All times are UTC + 8 hours




Post new topic Reply to topic  [ 433 posts ]  Go to page Previous  1 ... 17, 18, 19, 20, 21, 22, 23 ... 29  Next
Author Message
PostPosted: Nov 19th, '15, 10:55 
Newbie
Newbie

Joined: Aug 26th, '15, 15:24
Posts: 23
Gender: Male
Are you human?: YES
Location: East Moline, IL USA
Ok, so Im guessing by your reply that yes, I need to incorporate an EEPROM int say "first_run" and then have first_run = EEPROM.readInt(x); and if that is a initial value, load default values and change first_run to 1 in which case the program would run as normal. (there was not attachement)

Question: What would the plain english value be for an EEPROM? Is it 0?


Top
 Profile  
Reply with quote  
    Advertisement
 
PostPosted: Nov 19th, '15, 11:36 
Xtreme Contributor
Xtreme Contributor
User avatar

Joined: May 17th, '14, 07:21
Posts: 180
Gender: Male
Are you human?: YES
Location: Vancouver BC Canada
Just click on the big red link for the new sketch.

Yes, that is exactly how I did it. Check the EEPROM location designated "first_run". If it is not "1234" then preload the EEPROM values and set first_run to 1234. If it is already 1234 then ignore.

Not sure what you mean by plain english value. The EEPROM values could be anything in a fresh arduino.


Top
 Profile  
Reply with quote  
PostPosted: Nov 19th, '15, 12:23 
Newbie
Newbie

Joined: Aug 26th, '15, 15:24
Posts: 23
Gender: Male
Are you human?: YES
Location: East Moline, IL USA
Ok, so then instead of if it IS this, then load defaults you said if it's NOT (this specific value), then load defaults. Makes sense.

Looking at code now so as to be able to ask next question in one post (stand by)...

Ok, since I am honestly creating a hybrid of our two codes maybe you can help me on this one.

My system automatically corrects pH. I have values I want to store in the EEPROM for my minimum and maximum pH. I have the logic set. What I want to do (and what Im using your code as a reference to do) is to be able to manipulate these values without having to upload new code everytime. Your code says:
Code:
do {
            key = keypad.waitForKey();
            lcd.noBlink();
            lcd.noCursor();
            if (key >= '0' && key <= '9') {
              keyInput = (keyInput * 10) + (key - '0');
              lcd.setCursor(13, 2);
              lcd.print(keyInput);
            }
          } while (key >= '0' && key <= '9');
          if (key == 'A') {
            relay_light_nightMAX = keyInput;
            EEPROM.updateInt(12, relay_light_nightMAX);

to do an INTEGER, but I need a float or double. how do I make this work? Would
Code:
do {
            key = keypad.waitForKey();
            lcd.noBlink();
            lcd.noCursor();
            if (key >= '0' && key <= '9') {
              keyInput = (keyInput * 10) + (key - '0');
              lcd.setCursor(13, 2);
              lcd.print(keyInput);
            }
          } while (key >= '0' && key <= '9');
          if (key == 'A') {
            relay_light_nightMAX = (keyInput / 100);
            EEPROM.updateFloat(12, relay_light_nightMAX);

work? and then just enter my ph (say, 6.70) as 670?

By the way, I continue to be grateful for both the inspiration and the help.


Top
 Profile  
Reply with quote  
PostPosted: Nov 19th, '15, 14:59 
Xtreme Contributor
Xtreme Contributor
User avatar

Joined: May 17th, '14, 07:21
Posts: 180
Gender: Male
Are you human?: YES
Location: Vancouver BC Canada
Your code looks correct. Remember that "relay_light_nightMAX" or whatever variable you designate has to be declared as a float. Also, floats take up 4 bytes so the next EEPROM slot is 16.

If it strips the decimal, try dividing by "100.0" which will force the compiler to retain the floating point.


Top
 Profile  
Reply with quote  
PostPosted: Nov 22nd, '15, 15:52 
Newbie
Newbie

Joined: Aug 26th, '15, 15:24
Posts: 23
Gender: Male
Are you human?: YES
Location: East Moline, IL USA
Hey I wanted to halfway show off here. Since it has to do with my ap system this seems like the appropriate place. I put a piece of acrylic in the oven at 300°F for 10 minutes and then formed and drilled it to hold my temp and pH probe. First attempt at it so it's not perfect, but it does the job. No more fully submerged probes and their nicely secured.


Attachments:
pH holder.jpg
pH holder.jpg [ 154.8 KiB | Viewed 5230 times ]
Top
 Profile  
Reply with quote  
PostPosted: Nov 24th, '15, 00:40 

Joined: Nov 24th, '15, 00:15
Posts: 1
Gender: Male
Are you human?: yes
Location: Str. Louis MO
I am looking for someone to partner with us to help develop control systems that will work in our systems both hydro and aqua that that are operated by solar, wind and hydro electric for the USA and 3rd world countries. If you have expertise and interest please reply. Thanks Bill


Top
 Profile  
Reply with quote  
PostPosted: Nov 25th, '15, 03:39 

Joined: Nov 25th, '15, 03:36
Posts: 7
Gender: Male
Are you human?: always
Location: EDOMEX, Mexico
Hello Chiunmanfu

"$25 for 10 pcbs. Not too bad. I only need one set so the other 9 sets will go to whoever might be interested. "

Please put me down for a set of your pcbs. I have been following the thread since the beginning and am really impressed with your effort. Just let me know what I need to do concerning the payment.

Thanks
lost_bro


Top
 Profile  
Reply with quote  
PostPosted: Nov 27th, '15, 12:28 
Xtreme Contributor
Xtreme Contributor
User avatar

Joined: May 17th, '14, 07:21
Posts: 180
Gender: Male
Are you human?: YES
Location: Vancouver BC Canada
Lost_bro. I'll save you a set. I still have to test the power board. My job got really busy and I'm not looking forward to rewiring all that AC. Sorry it's taking so long.


Top
 Profile  
Reply with quote  
PostPosted: Nov 30th, '15, 14:43 
Newbie
Newbie
User avatar

Joined: Jul 20th, '14, 04:06
Posts: 39
Gender: Male
Are you human?: YES
Location: Iowa, USA
Instead of uploading data to the cloud (GroveStreams), what would it take to just append the data to a text file or Excel spreadsheet?


Top
 Profile  
Reply with quote  
PostPosted: Nov 30th, '15, 14:54 
Newbie
Newbie

Joined: Aug 26th, '15, 15:24
Posts: 23
Gender: Male
Are you human?: YES
Location: East Moline, IL USA
In short, set up the program to write to a file and then do a file print just like a client print or serial print. Csv files work best all you have to do is add a header to the file with each parameter with a comma in between, then print the data separated by a comma. Then end it with either a new line command after each entry. There are several examples online.


Top
 Profile  
Reply with quote  
PostPosted: Dec 1st, '15, 01:27 

Joined: Nov 25th, '15, 03:36
Posts: 7
Gender: Male
Are you human?: always
Location: EDOMEX, Mexico
Chiumanfu wrote:
Lost_bro. I'll save you a set. I still have to test the power board. My job got really busy and I'm not looking forward to rewiring all that AC. Sorry it's taking so long.


Thanks Chiumanfu.....

Just let me know how and when, I'm in no hurry as I understand how R&D can be very time consuming.

take care , peace
lost_bro


Top
 Profile  
Reply with quote  
PostPosted: Dec 1st, '15, 03:00 
Xtreme Contributor
Xtreme Contributor
User avatar

Joined: May 17th, '14, 07:21
Posts: 180
Gender: Male
Are you human?: YES
Location: Vancouver BC Canada
garyalan59 wrote:
Instead of uploading data to the cloud (GroveStreams), what would it take to just append the data to a text file or Excel spreadsheet?

This is actually quite simple. You would write the values as comma separated variable onto an SD card. There is an SD card slot already on the Ethernet module and the library is very simple.

There is a bunch of examples here. Take a look at the datalogger example.
https://www.arduino.cc/en/Reference/SD

When you want to look at the data, you just pull the SD card and import the files to excel or whatever visualization program you're using.


Top
 Profile  
Reply with quote  
PostPosted: Dec 2nd, '15, 09:23 

Joined: Nov 5th, '15, 11:08
Posts: 3
Gender: Male
Are you human?: yes
Location: vancouver
Hey Chiumanfu, if you have spare pcbs, can i buy a set off you?


Top
 Profile  
Reply with quote  
PostPosted: Dec 6th, '15, 09:34 

Joined: Mar 1st, '14, 19:54
Posts: 3
Gender: Male
Are you human?: YES
Location: Hoppers Crossing, Victoria, Australia
Chiu, I would also be keen to purchase a set of the PCB's if you have any spare this time around or in future if you do another run

Cheers

Mick


Top
 Profile  
Reply with quote  
PostPosted: Dec 6th, '15, 19:26 
A posting God
A posting God
User avatar

Joined: Jul 6th, '14, 20:25
Posts: 3854
Location: 2.2 kilometers up, NM, USA
Gender: Male
Are you human?: Series of particles
Location: Sapello, New Mexico USA
adamlwvdc36 wrote:
Hey I wanted to halfway show off here. Since it has to do with my ap system this seems like the appropriate place. I put a piece of acrylic in the oven at 300°F for 10 minutes and then formed and drilled it to hold my temp and pH probe. First attempt at it so it's not perfect, but it does the job. No more fully submerged probes and their nicely secured.

Nice work fabricating the bracket. You've got form and function balanced perfectly


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 433 posts ]  Go to page Previous  1 ... 17, 18, 19, 20, 21, 22, 23 ... 29  Next

All times are UTC + 8 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB® Forum Software © phpBB Group
Portal by phpBB3 Portal © phpBB Türkiye
[ Time : 0.049s | 15 Queries | GZIP : Off ]