2017-12-08 02:24 AM
Hi guys
I will give a quick run down so you can gauge my ability, as well as how you can help - which I would very much appreciate
equipment I am using:
Nucleo F030R8ST-Link v2STM32CubeMXKeil uVision5I started using the Nucleo recently, and it has been a big step up . In the past I used the Arduino comfortably. I made an app for the iphone to control LED lights connected to a Teensy(Arduino adaptation in simple) via bluetooth. I also touched upon the ESP8266 and hosted a webpage.
Since stepping up to the Nucleo I have struggled. I use the STM32CubeMX and downland to Keil. I have done a basic �Hello World� program which is to light up LD2 on my Nucleo. Success (link I used-
http://www.instructables.com/id/STM32F103-Blink-LED/).
However, I feel stuck and unsure of what to do now. I do not know the commands to do things. When the code was downloaded to Keil there is a line that reads:HAL_GPIO_TogglePin(LD2_GPIO_Port,LD2_Pin);
My understanding is this sets off the light when the button is pressed. However, how do I know what all the other commands are?
If I want to turn on the light, what do I do. and to turn off?If I wanted turn on for 2 seconds, turn off for 1, how would I do that?Then to advance, if i wanted to light up an external led on a breadboard, how would I go about that? and finally are there any projects you recommend I do to get stuck in?
Many thanks in advance, and I will reply as soon as I can
#code #beginner #f030r8Solved! Go to Solution.
2017-12-11 02:31 PM
The file is part of the CubeF0 package, you can either unpack it directly, or use CubeMX and have that install it under the repository directory.
http://www.st.com/en/embedded-software/stm32cubef0.html
2017-12-09 04:51 AM
If you want to use the Cube HAL library, read its documentation
http://www.st.com/resource/en/user_manual/dm00154093.pdf
JW
2017-12-09 06:17 AM
Examples under the Cube F0 tree that toggles LED, one on board, but could be changed to use pin on Arduino header, etc
\STM32Cube_FW_F0_V1.9.0\Projects\STM32F030R8-Nucleo\Examples\GPIO\GPIO_IOToggle\Src\main.c
2017-12-11 02:04 PM
Hi JW,
thank you, however, do you know any shortened guides, or resources which focus on using the LED's?
2017-12-11 02:05 PM
Hi, I dont have the following file path on my computer.
also, I dont want to use an Arduino in any form, just Nucleo
2017-12-11 02:31 PM
The file is part of the CubeF0 package, you can either unpack it directly, or use CubeMX and have that install it under the repository directory.
http://www.st.com/en/embedded-software/stm32cubef0.html
2017-12-11 02:39 PM
The pin headers, including the Arduino header, provide an arbitrary point to which to connect a breadboard or LEDs.
I would suspect YouTube to be a good source of videos, tutorials and the like.
2017-12-11 02:44 PM
Clive
thanks for the help, this is what i need...for now.
I have looked around for youtube videos, and maybe I am looking in the wrong places, but I did not find them so useful, or not aimed at the f030r8.
The file you said to download is a great starting point, and I am sure when I dig into it further I will begin to get a greater understanding
thank you!