OzStepCounter
This device counts the steps of x, y, z, a, b, c steppermotors. It is counted from the step signals sent out from the microcontroller.
This device only works on Arduino MEGA 2560 when connecting the step and direction outputs to the following pins:
- STEPX: 21; DIRX: 11;
- STEPY: 20; DIRY: 10;
- STEPZ: 19; DIRZ: 9;
- STEPA: 18; DIRA: 8;
- STEPB: 2; DIRB: 7;
- STEPC: 3; DIRC: 6;
How to test the step counter on Arduino Mega?
Arduino codes are included.
For help, here is the Arduino MEGA 2560 pinout (look at the numbers with the pink background).
You can download the Hungarian user's guide from here.I. "welcome" event from microcontroller
Example
c=welcome&id=ybnREm&type=OzStepCounter&pos=2&t=3
Parameters
Parameter | Type | Range | Functionality |
c | String | "welcome" | Identifies the welcome message. |
id | String | 6 characters (numbers, uppercase and lowercase characters) | The ID of the device which is chosen by the microcontroller. |
type | String | "OzStepCounter" | Determines the type of the device. |
pos | Byte | 0-255 | Determines the position of the device on the list of the ID manager of the microcontroller. Please make sure there are no other devices in the same position. |
t | Byte | 0-255 | Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again. |
II. Commands to microcontroller
None
III. Event from microcontroller
"went" event
This event is sent out if we measure stepper motor movement signals. If a motor is not ordered to move, it won't send anything about that motor.
Example
//movement measured on x,y,cs c=went_event&x=-50&y=200&cs=-9215&id=ybnREm&t=1
Parameters
Parameter | Type | Range | Functionality |
c | String | "went_event" | Identifies the event. |
Axis value (x | y | z | a | b | cs) | +/- Unsigned Long Int | -4294967295 to 4294967295 | Determines which motor was ordered to move and how much steps in which direction. Motors can be <x, y, z, a, b, cs>. The last motor is called cs, since 'c' is already used as a command and event identifier. |
id | String | 6 characters (numbers, uppercase and lowercase characters) | Identifies the device. The ID is never changed during communication. |
t | Byte | 0-255 | Counts the number of events and responses sent combined. Counts from 0 to 255 then from 0 again. |
More information
- Protokół szeregowy nadajnika-odbiornika RF 433 MHz
- Protokół szeregowy joysticka analogowego
- Protokół szeregowy czujnika analogowego
- Protokół szeregowy przycisku
- Protokół szeregowy buzzera
- Protokół szeregowy silnika DC
- Protokół szeregowy czujnika DHT
- Protokół szeregowy EEPROM
- Protokół szeregowy klawiatury
- Protokół szeregowy czujnika żyroskopu
- Protokół szeregowy menedżera ID
- Protokół szeregowy nadajnika-odbiornika IR
- Protokół szeregowy wyświetlacza LCD
- Protokół szeregowy czytnika NFC
- Protokół szeregowy bramy optycznej
- Rejestr
- Protokół szeregowy nadajnika-odbiornika RF24
- Protokół szeregowy diody RGB
- Protokół szeregowy czujnika RGB
- Protokół szeregowy enkodera obrotowego
- Protokół szeregowy serwomechanizmu
- Protokół szeregowy licznika kroków
- Protokół szeregowy silnika krokowego
- Protokół szeregowy przełącznika
- Protokół szeregowy czujnika temperatury
- Protokół szeregowy timera
- Protokół szeregowy czujnika ultradźwiękowego
- Komunikaty powitalne drukarki 3D Ozeki