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
- RF 433 MHz Transceiver serial protocol
- Analog Joystick serial protocol
- Analog Sensor serial protocol
- Button serial protocol
- Buzzer serial protocol
- DC Motor serial protocol
- DHT Sensor serial protocol
- EEPROM serial protocol
- Keyboard serial protocol
- Gyroscope Sensor serial protocol
- ID Manager serial protocol
- IR Transceiver serial protocol
- LCD Display serial protocol
- NFC Reader serial protocol
- Optical Gate serial protocol
- Register
- RF24 Transceiver serial protocol
- RGB Led serial protocol
- RGB Sensor serial protocol
- Rotary Encoder serial protocol
- Servo Motor serial protocol
- Step Counter serial protocol
- Stepper Motor serial protocol
- Switch serial protocol
- Temperature Sensor serial protocol
- Timer serial protocol
- Ultrasonic Sensor serial protocol
- Welcome messages of the Ozeki 3D Printer