Detecting headset in FONA

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
adonise
 
Posts: 35
Joined: Fri Aug 01, 2014 1:12 am

Detecting headset in FONA

Post by adonise »

is it possible to detect when a headset has been inserted into the headset jack?
Trying to figure out if it can be done on the software level so we can switch between speaker/mic and headset.
Thanks in advance -- Adonis

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Detecting headset in FONA

Post by adafruit_support_rick »

No, I'm afraid not.

User avatar
adonise
 
Posts: 35
Joined: Fri Aug 01, 2014 1:12 am

Re: Detecting headset in FONA

Post by adonise »

Thanks. I also have similar questions related to detecting activity on FONA.

Can you detect programmatically if the FONA is charging.

Is there a way to figure out how much charge is left in battery? For now I was thinking of observing the DC power and if it reaches a certain level then we can assume it is low.

User avatar
adafruit2
 
Posts: 22144
Joined: Fri Mar 11, 2005 7:36 pm

Re: Detecting headset in FONA

Post by adafruit2 »

You can query the battery level - check the example code, its liek getBatteryVoltage() or something in the library.
It doesn't tell you if its charging, it just tells you the level.
You can query the 5V pin to see if its being charged via USB tho. That plus the battery voltage will tell you just about anything you need to know about the battery state!

User avatar
adonise
 
Posts: 35
Joined: Fri Aug 01, 2014 1:12 am

Re: Detecting headset in FONA

Post by adonise »

The sim800 returns the charge percentage (AT+CBC) and I added a call to FONA library and uploaded into git as a pull request. However after using it for a day or so the system shutdown although it was reporting around 80% charge. At least I know for now that between 80%-100% system is ok, and when it gets close to 80% it is time to recharge.

Thanks for following up and your reply.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”