Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
duino-pi_protokol [2014/10/26 21:04]
admin
duino-pi_protokol [2014/11/10 02:18] (current)
admin
Line 3: Line 3:
 ---- ----
  
-CharacterNumberCharacterNumber, ....+The signal beginns with 4 diffrent characters (S,M,A,D) for stepper motorgear motors, analog- and digital output and the number of the deviceFollowed by an other character for the attribut and the value.
  
-Servo:\\+Duino-Pi Code:\\ 
 +[[https://github.com/dernulleffekt/embedded-artist]] 
 + 
 +structure:\\ 
 +character, number, character, number, .... return ("\n")\\ 
 + 
 + 
 +**Servo:**\\
 S = servo + number (1,2,3,...)\\ S = servo + number (1,2,3,...)\\
 P = position + angle (0 - 180)\\ P = position + angle (0 - 180)\\
-Example: S2P180 (Servo: 2, Possition: 180)\\+Example: S2P180 (servo: 2, possition = 180)\\
  
-Motor:+**Motor:**\\
 M = motor + number (1,2,3,...)\\ M = motor + number (1,2,3,...)\\
 +D = direction + number (0,1) (0 = clockwise, 1 = counterclockwise)\\
 S = speed + number (0-255) \\ S = speed + number (0-255) \\
-Example: M1S150 (Motor: 1, Speed: 150)+Example: M1D0S150 (motor: 1, directionclockwise, speed = 150)\\ 
 + 
 +**Analog**\\ 
 +A = analog + number (1,2,3,...)\\ 
 +V = value + number (0 - 255)\\ 
 +Example: A4V0 (analog: 4, value = 0)\\ 
 + 
 +**Digital**\\ 
 +D = digital + number (1,2,3,...)\\ 
 +S = value + number (0,1)\\ 
 +or\\ 
 +F = flash + number 1\\ 
 +Example: D2S1 (digital: 2, on), D1F1 (digital: 1, flash)\\
  
-analog +**Preset**\\ 
-digital+P = preset + number(1,2,3,...)\\ 
 +Preset 0 turn off everything\\ 
 +Preset 1 turn on everything\\