-
Notifications
You must be signed in to change notification settings - Fork 1
v10 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Temporarily adds SparkFun Toolkit
…on so that I can shift the address within
…orkflow for compatibility with other microcontrollers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My biggest concern here is maintaining backwards compatibility for older devices, there's a couple things here that will break that.
Also, probably too late now, but this branch should not be called v10, because the latest release is v1.0.0. At minimum, this should be v1.1.0, but if backwards compatibility is definitely going to be broken, then I think v2.0.0 is warranted. Leave the branch name, but do update the version number in library.properties accoringly
* Accidentally blasts it in the last commit
…in this branch to: `updateAddress` * Re-adds original address list * Adds constants for general min and max i2c addresses * Updates language around the address related functions
* Changes initiation check * Removes extraneous const
* With new parameter, `updateAddress` was no longer needed
@@ -80,7 +80,7 @@ void loop() | |||
myUltrasonic.getDistance(distance); | |||
|
|||
// Convert distance, which is an integer, to char so that we can print it. | |||
snprintf(distanceBuff, 4, "%d", distance); | |||
snprintf(distanceBuff, 6, "%d", distance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The number of bytes (now 6) cannot be bigger than the array size (still 4). If you need to display more characters, make the array bigger too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
… an unnecessary reload * Updates example four to continue with reading distance at the changed address.
This adjusts the functionality of the library to match the recently updated firmware. This was a simple transition as the basic framework was already in place and so the three main functions were simply tweaked and then the examples were adjusted around the changes to these functions. Lastly licensing information was added to all the files.