How do I convert code from Arduino Nano to STM32

Post here first, or if you can't find a relevant section!
Post Reply
Faisal071
Posts: 1
Joined: Thu Sep 24, 2020 9:03 pm

How do I convert code from Arduino Nano to STM32

Post 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
GonzoG
Posts: 403
Joined: Wed Jan 15, 2020 11:30 am
Answers: 27
Location: Prudnik, Poland

Re: How do I convert code from Arduino Nano to STM32

Post 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.
mrburnette
Posts: 633
Joined: Thu Dec 19, 2019 1:23 am
Answers: 7

Re: How do I convert code from Arduino Nano to STM32

Post by mrburnette »

Faisal071 wrote: Thu Sep 24, 2020 9:05 pm 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
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
Basic Voltage Divider.jpg (37.64 KiB) Viewed 2577 times
Post Reply

Return to “General discussion”