Can't find HALL effect sensor read command


#1

Can someone tell me if there is a read Hallsensor() command for the ESp32 ?
I have tried a few reads used in other pythons but it seems to not work.

Notes- I have not included any libraries do i need to ?

TY das


#2

Is it possible this has been overlooked or must it be done manually by setting up ADC?


#3

hi @The_Kaveman

Your code should depend on the type of hall sensor used.
For example, if you are using a digital hall sensor then you just need to check the state of the pin that is connected to the sensor.
If you are using analog hall sensor then you can measure the output of the sensor with the ADC.
So it mainly depends on the sensor.

Let me know if you need further help.


#4

There is an INBUILT hall sensor . In Arduino platform its just a readsensor() command … IT uses the ADC
reference-


#5

This is code for arduino IDE- using INTERNAL HALL

void setup() {
Serial.begin(115200);
}
void loop() {
int measurement = 0;
measurement = hallRead();
Serial.print( "Hall sensor measurement: " );
Serial.println(measurement);
delay(1000);
}

ref- https://techtutorialsx.com/2017/07/16/esp32-arduino-internal-hall-sensor-measurements/


#6

Any luck seeing my reply posts to this?


#7

hi @The_Kaveman

I think there isn’t an Inbuilt function for reading the hall sensor in Zerynth.
You can either read the output pin digitally or through ADC.

Is there something else i could help you with? :slight_smile:


#8

Thanks Karimhamdy ,
I’ll have to work through it.