cancel
Showing results for 
Search instead for 
Did you mean: 

Wb55 - How to read values from ADC

JDIRI.1
Associate II

Hi everybody!

Working on Martian Robot développed by VittaScience​, I need to read values coming from 5 blackline sensors to the ADC of the wb55.

I tried to analogRead() the pin but nothing...

Some ideas?

Thanks!​

11 REPLIES 11
Jaroslav JANOS
ST Employee

Just tested on 500Kbit/s, works fine for me. Please check the wiring and SPI configuration: master mode, full duplex, datasize 10 bit and enabled NSS signal on PA4.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

JDIRI.1
Associate II

Hi @Jaroslav JANOS​ ,

It works fine, thank you very mutch, I missed NSS Signal on my configuration.

Now I isolate all the values for each sensor but the values seems to fluctuate a lot with the light .

Just need to find an algorithm to detect the lines now...

Thank you!