-
-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

