I've noticed that a gentle knock by accident will cause less than 100 units. Therefore I've used the if function:
" if $i1 > 100 then $i1==1 else $i1==0 "
This basically creates an 'on or off' switch for the signal, similar to the use of a digital pin. However the advantage of using the analog pins is that I am able to easily create this threshold, and change it. Ideally however I would like the threshold to be an integer box so I could change it easily and on the fly if necessary. However to achieve this I may need to rethink the structure of my initial patch. For now functionality is the priority rather than efficiency.
EDIT:
Actually, the I thought this made a difference but the second time I loaded the patch it didnt seem to do anything. having said that, I know now that I definitely need to find a way to control the sensitivity of the inputs. The more immediate problem however is making all the inputs work, as the standard Arduino2Max template only allows for 6 analog inputs, when I need 10. Therefore I will need to edit the Arduino code in order to read the extra inputs.
Actually, the I thought this made a difference but the second time I loaded the patch it didnt seem to do anything. having said that, I know now that I definitely need to find a way to control the sensitivity of the inputs. The more immediate problem however is making all the inputs work, as the standard Arduino2Max template only allows for 6 analog inputs, when I need 10. Therefore I will need to edit the Arduino code in order to read the extra inputs.
No comments:
Post a Comment