Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Scratch for Arduino

Actuators messages (Data from Scratch to Arduino)


S4A Name "#$e Motor 4 Continuous rotation Servomotor D4 A& &d %&%& &&&& &&&& &&dd Analog 5 Pseudo analog (PWM) Output D Ap pp Analog 6 Pseudo analog (PWM) Output D! )p pp Motor 7

Protocol Specification
Motor 8 Analog 9 Pseudo analog (PWM) Output D$ Cp pp Digital 10 Digital 11 Digital Output D%& D& &v Digital Output D%% D# &v Motor 1 Servomotor (Angle control) D%' *a aa Digital 1! Digital Output D%( *# &v

Continuous Servomotor rotation (Angle Servomotor control) D" )# &d %&%% %&&& &&&& &&&d D# Ca aa

Arduino %&' (in )*+ ,alue -%. ,alue

%&%& %&&P %&%% &&&P &PPP pppp &PPP pppp

%%&& &&AA %%&& %&&P %%&% &&&& %%&% %&&& %%%& &&AA %%%& %&&& &AAA aaaa &PPP pppp &&&& &&&v &&&& &&&v &AAA aaaa &&&& &&&v

Sensors messages (Data from Arduino to Scratch)


S4A Name "#$e Arduino %&' (in )*+ ,alue -%. ,alue Analog 0 A& #, ,r %&&& &,,, &,,, rrrr Analog 1 A% #, ,r %&&& %,,, &,,, rrrr Analog A' $, ,r %&&% &,,, &,,, rrrr Analog ! A( $, ,r %&&% %,,, &,,, rrrr Analog 4 A4 A, ,r %&%& &,,, &,,, rrrr Analog 5 A A, ,r %&%& %,,, &,,, rrrr Digital D' ), ,r %&%% &,,, &,,, rrrr Digital ! Digital +nput D( ), ,r %&%% &,,, &,,, rrrr Analog input Analog input Analog input Analog input Analog input Analog input Digital +nput

red - channel num.er .lue - channel data (CAP+/A0 means MS)s) green - 0S) of each channel orange - protocol defined .it values gre1 - padding .1tes

d - direction (&&-motor off2 &%-cloc34ise2 %&-anticloc34ise) P5p - p4m value (values from & to ' ) A5a - angle (values from & to (!&) ,5r - reading from sensor

s1vic6sindormir7net '&%%

You might also like