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
- Protocolo serie del transceptor RF de 433 MHz
- Protocolo serie del joystick analógico
- Protocolo serie del sensor analógico
- Protocolo serie del botón
- Protocolo serie del zumbador
- Protocolo serie del motor de CC
- Protocolo serie del sensor DHT
- Protocolo serie de la EEPROM
- Protocolo serie del teclado
- Protocolo serie del sensor de giróscopo
- Protocolo serie del administrador de ID
- Protocolo serie del transceptor IR
- Protocolo serie de la pantalla LCD
- Protocolo serie del lector NFC
- Protocolo serie de la puerta óptica
- Registro
- Protocolo serie del transceptor RF24
- Protocolo serie del LED RGB
- Protocolo serie del sensor RGB
- Protocolo serie del codificador rotatorio
- Protocolo serie del motor servo
- Protocolo serie del contador de pasos
- Protocolo serie del motor paso a paso
- Protocolo serie del interruptor
- Protocolo serie del sensor de temperatura
- Protocolo serie del temporizador
- Protocolo serie del sensor ultrasónico
- Mensajes de bienvenida de la impresora 3D Ozeki