loadcell 2.0.0.0
main.c File Reference

Load cell Click example. More...

#include "board.h"
#include "log.h"
#include "loadcell.h"

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Variables

loadcell_data_t cell_data
 

Detailed Description

Load cell Click example.

Description

Load cell click is a weight measurement click which utilizes a load cell element, in order to precisely measure the weight of an object. The Load Cell click can be used with the strain gauge type of load cells and can measure up to ±20V or ±40V of differential voltage.

The demo application is composed of two sections :

Application Init

Initializes GPIO driver and performs the device reset, after which the next conversion cycle will be for channel B with 32 gate value. This function also selects the frequency of internal oscillator to 10Hz. Sets tare the scale, calibrate scale and start measurements.

Application Task

This is an example which demonstrates the use of Load Cell Click board. Display the measurement of scales in grams [ g ]. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes for every 1 sec.

Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( void )

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )

Variable Documentation

◆ cell_data

loadcell_data_t cell_data