indexcounter  2.0.0.0
Functions | Variables
main.c File Reference

Index Counter Click example. More...

#include "board.h"
#include "log.h"
#include "indexcounter.h"

Functions

void log_display (float rpm_val)
 
void application_init (void)
 
void application_task (void)
 
void main (void)
 

Variables

uint8_t dir_state
 
uint8_t speed_state
 
uint8_t enable_speed = INDEXCOUNTER_SPEED_ENABLE
 
uint8_t n_pole_pairs = 3
 
uint32_t time_cnt = 0
 
uint32_t pulse_ms
 
uint32_t start_timer = 1
 
float speed_rpm
 

Detailed Description

Index Counter Click example.

Description

This application enables usage of Index counter click board which can be used to measure rotational speed.

The demo application is composed of two sections :

Application Init

Initilaziation of GPIO and write log.

Application Task

This is an example which demonstrates the use of the Index Counter click board. This example shows the direction of movement, Rotations Per Minute ( RPM or speed ) of the three pairs of rotating poles positioned in the sensor operating range. Results are being sent to the Usart Terminal where you can track their changes.

note: Additional Functions :

Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( void  )

◆ application_task()

void application_task ( void  )

◆ log_display()

void log_display ( float  rpm_val)

◆ main()

void main ( void  )

Variable Documentation

◆ dir_state

uint8_t dir_state

◆ enable_speed

uint8_t enable_speed = INDEXCOUNTER_SPEED_ENABLE

◆ n_pole_pairs

uint8_t n_pole_pairs = 3

◆ pulse_ms

uint32_t pulse_ms

◆ speed_rpm

float speed_rpm

◆ speed_state

uint8_t speed_state

◆ start_timer

uint32_t start_timer = 1

◆ time_cnt

uint32_t time_cnt = 0