Search found 16 matches

by Simpler1
Sun Apr 18, 2021 4:34 pm
Forum: General Discussion and Questions
Topic: How to implement the BLE Current Time Service
Replies: 1
Views: 2969

Re: How to implement the BLE Current Time Service

I figured it out. All of of the values are just strung together in a single bytes object from top to bottom (left to right). Exact Time 256 + Adjust Reason(uint8) Exact Time 256 = Day Date Time + Fractions256(uint8) Day Date Time = Date Time + Day of Week Date Time = Year(uint16) + Month(uint8) + Da...
by Simpler1
Sun Apr 18, 2021 1:47 am
Forum: General Discussion and Questions
Topic: How to implement the BLE Current Time Service
Replies: 1
Views: 2969

How to implement the BLE Current Time Service

I want to implement the BLE Current Time Service on an ESP32-CAM so that I can read, write, and notify the values from a peripheral. I can see that the Current Time Service has the following: name="Current Time Service" type="org.bluetooth.service.current_time" uuid="1805" ... <Characteristics> <Cha...
by Simpler1
Mon Feb 15, 2021 4:27 pm
Forum: General Discussion and Questions
Topic: How to check the battery voltage on an ESP32-CAM?
Replies: 0
Views: 1028

How to check the battery voltage on an ESP32-CAM?

I'm just getting started with MicroPython with an ESP32-CAM and would like to check the battery voltage and report it programmatically.

Are there any instructions or links that describe how I would go about this is MicroPython?

Thanks
by Simpler1
Mon Feb 15, 2021 4:25 pm
Forum: General Discussion and Questions
Topic: How to improve RTC accuracy with an ESP32-CAM?
Replies: 0
Views: 1336

How to improve RTC accuracy with an ESP32-CAM?

I'm considering connecting a DS3231 to my ESP32-CAM to improve the clock accuracy during deep sleep. The wake time is currently very erratic and unpredictable with the default setup. The following site shows that a different internal oscillator can be used for the clock when in deep sleep, but I'm n...
by Simpler1
Mon Feb 15, 2021 3:23 am
Forum: General Discussion and Questions
Topic: Why does the flush keyword not work with print()?
Replies: 2
Views: 1786

Re: Why does the flush keyword not work with print()?

Hi jimmo,

I was just creating some code to test the lightsleep and deepsleep modes on the ESP32-CAM when I noticed this limitation.

I was just surprised that flush didn't work with print.
by Simpler1
Fri Feb 12, 2021 10:09 pm
Forum: General Discussion and Questions
Topic: Why does the flush keyword not work with print()?
Replies: 2
Views: 1786

Why does the flush keyword not work with print()?

I am printing a string immediately before going into lightsleep, but the string doesn't complete until the sleep command is complete. The "flush" keyword on the print command should alleviate this, but it doesn't seem to work. print('x', flush=True) produces File "<stdin>", line 1, in <module> TypeE...
by Simpler1
Thu Feb 11, 2021 3:29 pm
Forum: General Discussion and Questions
Topic: BLE characteristic_user_description (0x2901)
Replies: 6
Views: 4675

Re: BLE characteristic_user_description (0x2901)

Thanks Jimmo. That worked.
by Simpler1
Sun Jan 31, 2021 3:28 pm
Forum: General Discussion and Questions
Topic: BLE characteristic_user_description (0x2901)
Replies: 6
Views: 4675

BLE characteristic_user_description (0x2901)

How is a Bluetooth Low Energy user description supposed to be defined? I've tried the following: _FILES_UUID = bluetooth.UUID("7a890001-e96d-4842-8b3d-69ce27889cd6") _FILE_COUNT_CHAR = ( bluetooth.UUID("7a890002-e96d-4842-8b3d-69ce27889cd6"), bluetooth.FLAG_NOTIFY | bluetooth.FLAG_WRITE, ( ( # org.b...
by Simpler1
Mon Jan 18, 2021 1:50 pm
Forum: General Discussion and Questions
Topic: Data format to pass "Date Time" (0x2A08) over BLE
Replies: 4
Views: 2728

Re: Data format to pass "Date Time" (0x2A08) over BLE

Thanks for the link and example jimmo. Perfect.
by Simpler1
Mon Jan 18, 2021 1:49 pm
Forum: General Discussion and Questions
Topic: Multiple BLE Services Example
Replies: 3
Views: 1887

Re: Multiple BLE Services Example

Thanks for your feedback jimmo. It helps a lot.