View previous topic :: View next topic |
Author |
Message |
AlanGHosler
Joined: 25 Jan 2011 Posts: 110

|
Posted: Tue Oct 29, 2013 11:18 pm Post subject: Distance, temperature and humidity measurement - ATtiny861A |
|
|
This program uses a Parallax ping, National Semiconductor LM34DZ and Honeywell HIH-4000-003 sensor to measure the distance (head space), temperature and humidity respectively in a septic holding tank. Elsewhere in this forum is programming for using a MaxDetect RHT03 to measure temperature and humidity. I like the Honeywell sensor when only a few points need to be monitored as I believe it provides a more accurate measurement of humidity and it is provided with a calibration sheet.
The attached program shows the use of Timer1 of the ATtiny861A in the 16-bit mode. I don't believe this is addressed in BASCOM 2.0.7.6.
Interestingly to me is that I could not get statements like "Reset PingLed" to work when accompanied by "PingLed Alias PINB.6." The program would compile but the LED would not flash. So I have used "SET PortB.6" which makes it somewhat more difficult to use this programming with other microcontrollers.
Mark provides me very useful comments on my programs - one of which is to make them more portable. I tried.
Contact me if you are interested the PCB or panel design for the project. |
|
Back to top |
|
 |
albertsm
Joined: 09 Apr 2004 Posts: 6197 Location: Holland

|
Posted: Wed Oct 30, 2013 12:50 am Post subject: |
|
|
thank you for sharing your project. good to see you finished it.
about Pingled : you made an alias to a PIN register.
That should be a PORT register.
If you write to a PIN register in the tiny861 you toggle the output pin. If that is what you want, you can best use TOGGLE portb.6
Do not forget that the data direction must still be set to output in order to make it work. _________________ Mark |
|
Back to top |
|
 |
Duval JP
Joined: 22 Jun 2004 Posts: 1197 Location: France

|
Posted: Sat Jul 20, 2024 9:27 am Post subject: |
|
|
Thank you very much for your project, I would like to to something to measure my rain water collector level.
Do you have the part number of your ping detector? 10 years after is it still the same ?
JP
 _________________ pleasure to learn, to teach, to create |
|
Back to top |
|
 |
MWS
Joined: 22 Aug 2009 Posts: 2335

|
Posted: Sat Jul 20, 2024 11:51 am Post subject: |
|
|
Argh, my comments fell onto an 11 year old post, the TO should know by now the difference between aliasing PIN and PORT. LOL |
|
Back to top |
|
 |
AlanGHosler
Joined: 25 Jan 2011 Posts: 110

|
Posted: Thu Oct 24, 2024 7:48 pm Post subject: Ping Part Number |
|
|
Sorry for the long delay. I have been gone for several months. My sonic detector is a MaxBotix SCXL-MaxSonar WR/WRC MB7589.
It is still operating all these years after being in the head space of a septic tank.
Alan |
|
Back to top |
|
 |
Duval JP
Joined: 22 Jun 2004 Posts: 1197 Location: France

|
Posted: Fri Oct 25, 2024 2:37 pm Post subject: |
|
|
hi Alan
Many thanks for your answers. I've found distributors in france. I haven't made any progress with my project yet, but it's next on my list.
JP  _________________ pleasure to learn, to teach, to create |
|
Back to top |
|
 |
|