Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

WARG members often find that joining this team requires more knowledge and has a larger learning curve than other student teams. Once members have acquired this knowledge they gain a lot of confidence and are able to make large contributions to the team. Therefore, this Bootcamp is designed as a first task to be completed to both help you through the learning curve, while giving you a project that is fully your own. The hope is that once you complete this Bootcamp you will feel confident and hopefully have acquired enough skills such that you are ready to take on tasks with our aircraft! Just a quick disclaimer: this Bootcamp will help accelerate and minimize the learning curve, but it will not teach you everything there is to know about. The remaining knowledge will be acquired through completing other tasks with the team.

Responsible Team Lead

Dhruv Rawat (“@Elias [Dhruv R]” on Discord)

Bootcamp Objectives

  • Learn C, and become familiar with some of the concepts in embedded programming.

  • Learn the underlying Hardware Abstraction Layer (HAL) libraries.

  • Learn how to track code revisions and perform code reviews using GitHub.

...

Analog to digital converters (ADCs) take an analog value and convert it to a digital numbers. This peripheral is useful to interface with sensors, battery voltages, and potentiometers. For this bootcamp, you will be using the analog voltage of the potentiometer and converting it to a digital PWM signal to drive a servo.

...

  • For PWM, you will need to use timer 16 to create a PWM signal. The signal should be at 50Hz, with an on-time ranging from 1ms - 2ms. To acheive achieve this frequency, you will need to change the prescaler and period in tim.c. Note that the input clock frequency is 48 MHz. To change the duty cycle, you will need to set the compare register using the HAL library APIs.

  • Look at the HAL_TIMADC_, __ HAL_TIM_, and __HAL_ADCTIM_ functions to access the timers and ADCs. The HAL User Manual will be particularly useful here.

  • At the top of the main.h file is the IO pin mappings. Use those defines when configuring your ADC and PWM ports. If you want to learn more about the pinout and IO configuration, you can download STM32Cube and open the bootcamp.ioc file. (Not necessary due to COVID-19)

Git

The code for the embedded bootcamp is hosted on GitHub. You will have to fork the repository to make your changes. If you don't know what Git or GitHub is, or how to use it, please read this [Git and GitHub tutorial]() that we wrote.

Submission

Because of resource constraints, you will likely not have the ability to actually test the code. Just make sure it compiles. To do this, enter the root directory of your project (~/embedded-bootcamp) and type make into your terminal. Afterwards, a message will be displayed on your terminal letting you know if your code built successfully. Please include a screenshot of this message when you submit your code.

To submit your work, create a pull request of your fork against the UWARG/embedded-bootcamp repository. Name your pull request Bootcamp: YOURNAME. Tell the responsible team lead that you've completed the bootcamp and they will review your submission. You may be asked to revise some things.

NoteIf you would like to test out the code, come to one of the work days and we'll show you how to program the board and actually test it out (Not possible due to COVID-19)

Additional Resources

2. Previous Experience

If you feel that you've obtained significant enough experience elsewhere to be exempt from option 1, you can contact the responsible team lead to explain, and preferably show what you've done. It will be up to the Team Lead’s discretion whether you qualify to be exempt from the Bootcamp. If the Team Lead feels that you should still complete option 1 it is because they think you can learn and gain skills from the completion of the Bootcamp.

...