Aula JazmatiNajib Kassab
Published © MIT

Raspberry Pi Force Gauge and Weight Scale Using Hexabitz

Learn how to build a digital weight scale and force gauge with load cell sensor (H26R0x) and Raspberry Pi.

AdvancedFull instructions provided6 hours3,614
Raspberry Pi Force Gauge and Weight Scale Using Hexabitz

Things used in this project

Story

Read more

Schematics

Raspberry Pi Force Gauge and Weight Scale Schematic

Code

Demo code

C/C++
/*
    BitzOS (BOS) V0.2.3 - Copyright (C) 2017-2020 Hexabitz
    All rights reserved
		
    File Name     : demo.cpp
    Description   : Hexabitz demo source file. .
*/
/* Includes ------------------------------------------------------------------*/

#include "../hexabitz/BOS.h"
  
uint8_t array[10]={0};


int main(int argc, char *argv[])
{
  
init();	
  

messageParams[0]= 1;
messageParams[1] = 5;
messageParams[2] = 1;
uint32_t period = 200;
uint32_t timeout = 40000;
memcpy(&messageParams[3], &period , 4); 
memcpy(&messageParams[7], &timeout, 4); 
SendMessageToModule(1,CODE_H26R0_STREAM_PORT_GRAM, 11);
ReceiveWeight(array,10,period , timeout, "N");
//std::cout<<array<<std::endl;


	std::cout<<"Press any Key and enter to exit"<<std::endl;
	while(1){
	  
	  
	  if(getchar()!=0) break;
	  
	  delay_s(1);
	      }
	std::cout<<"exiting ..."<<std::endl;
  
	return 0;
}
/*----------------------------------------------------------------------------*/

H26R0x-Firmware

HF1R0x-Firmware 0.2.0

Credits

Aula Jazmati

Aula Jazmati

49 projects β€’ 193 followers
(PhD) in Electronic Engineering 2023 πŸ’‘πŸ•ŠοΈ
Najib Kassab

Najib Kassab

11 projects β€’ 15 followers

Comments