There seemed to be trouble with the device. After some time, it seemed to stop working because it would never vibrate. I assumed I would have to download the program because that worked last time, but once I gave the battery a full charge, regular operation resumed. After moving the vibrating motor, I noticed that it was significantly less effective when it wasn't adhered to the board and left suspended by its wires.
Perhaps I could have prevented some of the errant behavior by keeping a charge on the battery. Battery monitoring was the next task. I connected a wire from analog pin 6 to the positive terminal, then disconnected the battery so I could link it to the computer. I wrote a function to return the battery level in volts, then another to alert me when it got low. When the voltage dropped below three volts, the compass functions would cease, and every twenty seconds, the buzzer would trigger three times. It was easy to test because with the battery disconnected, and the reading was less than three volts, it was zero.
I tried to use the onboard LED as another indicator, but I don't think this Arduino has one. The next time I need to program, I won't have to remove the battery, I can leave the 5V pin from the USB↔serial adapter. The GND terminal will still need to be connected.
GitHub repo for Cardinal, aka InCompass
The rest of the posts for this project have been arranged by date.
Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Completed projects from year 7
Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com
This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.
All information on this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.
All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by Brian McEvoy, cannot be used to claim property or assets.
Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.
This blog, including pictures and text, is copyright to Brian McEvoy.
2020-08-12
Comments
Post a Comment