Tags:
create new tag
view all tags

Examination projects on Embedded Systems,

Physics class

I expect that you solve the problems on your own and you do not copy from your colleagues. For the examination itself, I will add a few questions on how you solved the problem and I will check with each of you, if the solution you present is your own. Believe me that I can easily find out if you copied, in which case I will count the problem as not solved!

C-programming:

Calculate sine values:
Write a program that calculates the sine values of angles between 0 and 360 degrees (0 and 360 included) in steps of 30 degrees. It should therefore print the values of

  • sin(30), sin(60), sine(90) sin(120) ... sin(330) sin(360) where all the parameters to the sine function are given in degrees. Use a loop to accomplish this.

LED programming

Write 3 C programs:

  • led_on

  • led_off

  • led_state

The first program switches an LED connected to pin 17 (GPIO pin 0) on.
The second one switches it off
The third program reads the state of the LED from pin 18 (GPIO pin 1).

How do you have to cable your LED? Produce a schematic diagram.

Command line parameters

Write a C program that switches the LED state to a level defined by the user. The program is called led and has 1 command line parameter which can be either “on” of “off”.

The LED is connected to pin 17 (GPIO 0).

When the user types:

  • ./led on the LED should go on

  • if he types ./led off the LED should go off.

For each of the programs write the C code and the Makefile as well as a short description (README file) on how you solved the problem.

Here is the pdf of the examination sheet:

https://afnog.iotworkshop.africa/pub/Embedded_Systems/ExamPhys/examphy.pdf

-- Uli Raich - 2017-11-23

Comments

Topic attachments
I Attachment History Action Size Date Who Comment
PDFpdf examphy.pdf r1 manage 47.2 K 2017-11-23 - 18:37 UnknownUser  
Unknown file formatgz results.tar.gz r1 manage 106.6 K 2017-11-28 - 08:09 UnknownUser  
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2017-11-28 - uli
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback