2019-10-14 10:12 AM
I have this code in Arduino,but i need translate in hall library,could have i the translate?
Tested code:
Code: [Select]
#include "SPI.h"
unsigned int result = 0;
unsigned int result1 = 0;
unsigned int result2 = 0;
void setup ()
{
Serial.begin(9600);
SPI.begin();
SPI.setBitOrder(MSBFIRST);
}
void loop () {
digitalWrite(SS, LOW);
//Reading 16 bit frame (the first half of 16-bit SPI transfer)
result[0]= SPI.transfer(0b00000000);
result[1]=SPI.transfer(0b000000);
digitalWrite(SS, HIGH);
Thanks!
2019-10-14 10:13 AM
Int result[2] i' m sorry!