BLE 33 - .overlay updates, enable Wire1, pins match MBED, change analogRead to 12 bit #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: #49 #48
Note: @mjs513 has a version of the wire scanner that works with this.
however Wire object takes a while to scan unless external PU resistors are connected to SCL/SDA pins.
The sketch also turns on the Wire1 PU resistors and enables the Wire1 objects, using D32 and D33 below.
These pins are shown on the schematics for the different versions of the Nano 33 BLE boards.
Also @mjs513 found an interesting web page:
https://github.com/saltyJeff/zephyr_arduino_nano_33_ble/blob/main/src/init_arduino_style.c
Which also confirmed the need to initialize the two pins on Wire1 for the devices to work.
Extra pins:
Note some of these pins are important to enable Wire1 to work. Including enabling power to the sensors as well as to enable the Pull up resistors on the Wire1 object.
Added Wire1 object to the list of wire bojects.
Set default clock-frequency on the two I2C objects, like the GIGA has defined.
Also changed the ADC conversion resolution for all of the channels from 10 bits to 12, as that is I believe the maximum the device supports. So when we pull in the PR for analogRead it should then map down to the resolution the user chooses with analogReadResolution call.