Aquarium Outlet Controller

I haven't checked the code on this instructable, but one advantage of the arduino is that it is easy to add a calibration factor to the code if you need to :)

Tim

Interesting point - I haven't added any calibration to the code: would love any feedback to improve the code or functionality...
 
Interesting point - I haven't added any calibration to the code: would love any feedback to improve the code or functionality...
OK - feedback :)

Not a criticism and not sure as it is really an improvement, but there are two comments that spring to mind from a quick look:
1. You've used constants and one define. Define is out of favour and personally I'd change the one define to just be another constant
2. You have several relay toggle functions. The only difference between them is the relay they toggle (ie which pin) and the text they display (don't think I there were any other differences?). You could do that with just one function and pass in the text to be displayed and pin number as parameters. Would reduce the amount of code.

As I say, arguably not improvements, but features which are out of favour can sometimes be removed from compiler support (not likely in the near future) and changing to pass the parameters into the relay toggle function would mean adding additional relays would just need an additional call to the same function rather than needing a new function. I doubt your sketch is anywhere near storage limits so not really much of an advantage in this case, but (IMO) makes the code a bit simpler :)

Not to suggest what you have done is wrong. Neither of those changes would actually affect the way it works at all.

Tim
 
OK - feedback :)

Not a criticism and not sure as it is really an improvement, but there are two comments that spring to mind from a quick look:
1. You've used constants and one define. Define is out of favour and personally I'd change the one define to just be another constant
2. You have several relay toggle functions. The only difference between them is the relay they toggle (ie which pin) and the text they display (don't think I there were any other differences?). You could do that with just one function and pass in the text to be displayed and pin number as parameters. Would reduce the amount of code.

As I say, arguably not improvements, but features which are out of favour can sometimes be removed from compiler support (not likely in the near future) and changing to pass the parameters into the relay toggle function would mean adding additional relays would just need an additional call to the same function rather than needing a new function. I doubt your sketch is anywhere near storage limits so not really much of an advantage in this case, but (IMO) makes the code a bit simpler :)

Not to suggest what you have done is wrong. Neither of those changes would actually affect the way it works at all.

Tim

Good feedback Tim - I will keep your suggestions in mind for future software versions. For v1.3 I'm working on a Bluetooth serial connection with an Android app (created using App Inventor). I have the Bluetooth working, and have executed a test app from Instructables, so now need to reconstruct and modify to allow, hopefully, the temp to be modified and to customize ON/OFF and repeat Alarm parameters from the app.
 
Good feedback Tim - I will keep your suggestions in mind for future software versions. For v1.3 I'm working on a Bluetooth serial connection with an Android app (created using App Inventor). I have the Bluetooth working, and have executed a test app from Instructables, so now need to reconstruct and modify to allow, hopefully, the temp to be modified and to customize ON/OFF and repeat Alarm parameters from the app.
Now that's a much more interesting thing to be working on :)

Tim
 
A bit over my head, but I'm working through it, slowly :hmm5:
Well, mobile app development is not exactly home territory for me, but I am a coder by trade and I suspect there are a few on here that've played with apps, so if you have any questions chuck them on here and someone will help :)

Tim
 
Back
Top