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!
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.
Write 3 C programs:
led_on
led_off
led_state
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.
Here is the pdf of the examination sheet:
https://afnog.iotworkshop.africa/pub/Embedded_Systems/ExamPhys/examphy.pdf
I | Attachment | History | Action | Size | Date | Who | Comment |
---|---|---|---|---|---|---|---|
examphy.pdf | r1 | manage | 47.2 K | 2017-11-23 - 18:37 | UnknownUser | ||
gz | results.tar.gz | r1 | manage | 106.6 K | 2017-11-28 - 08:09 | UnknownUser |