Page 1 of 1
How do I convert code from Arduino Nano to STM32
Posted: Thu Sep 24, 2020 9:05 pm
by Faisal071
I want to re-create this for STM32 blue pill board from AliExpress. How do I sort the analogue input stuff out
This is the project :
https://www.youtube.com/watch?v=CtHzUQg ... osProjects
Re: How do I convert code from Arduino Nano to STM32
Posted: Thu Sep 24, 2020 9:46 pm
by GonzoG
Analog inputs are not a problem. It all works same as on Arduino boards. Just remember to use proper resistors in voltage dividers as you cannot exceed 3.3V.
Re: How do I convert code from Arduino Nano to STM32
Posted: Thu Sep 24, 2020 11:58 pm
by mrburnette
I strongly suggest you prototype your DC components using an online circuit simulator, for example:
http://falstad.com/circuit/
Doing the virtual design ensures you understand what the software is suppose to accomplish and is a valuable tool for future projects. Because you are working at 3.3Volts instead of 5Volts, some results may take a little thinking to understand especially when dealing with active semiconductor devices.
Code: Select all
$ 1 0.000005 10.20027730826997 63 10 62
v 112 368 112 48 0 0 40 3.3 0 0 0.5
w 112 48 240 48 0
r 240 48 240 208 0 10000
r 240 208 240 368 0 10000
w 112 368 240 368 0
O 240 208 304 208 1 0
o 5 64 0 4098 5 0.1 0 1

- Basic Voltage Divider.jpg (37.64 KiB) Viewed 3559 times