You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use two ultrasonic distance sensors with Ottoblockly. This is obviously intended, as I can number my ultrasonic sensors.
Unfortunately, an error occured. The C-code reveals the problem. The code generated by the 'ultrasonic pins' block creates a function named 'ultrasound_distance_simple()'. This function is created with the same name by every 'ultrasonic pins' block. Hence the error code, that there are multiple declaration of the same function.
I'm adding screenshots.
I see two possible solutions to this:
Add a number to the function name e.g. 'ultrasound_distance_simple_1()'
More elegantly: don't hardcode the pin numbers in the 'ultrasound_distance_simple()' function. Instead, give the pins as an input to the function when using it. And obviously don't add the function again when it's already there.
The text was updated successfully, but these errors were encountered:
I tried to use two ultrasonic distance sensors with Ottoblockly. This is obviously intended, as I can number my ultrasonic sensors.
Unfortunately, an error occured. The C-code reveals the problem. The code generated by the 'ultrasonic pins' block creates a function named 'ultrasound_distance_simple()'. This function is created with the same name by every 'ultrasonic pins' block. Hence the error code, that there are multiple declaration of the same function.
I'm adding screenshots.
I see two possible solutions to this:
The text was updated successfully, but these errors were encountered: