Difference: SolutionsToTheExercises (9 vs. 10)

Revision 102017-11-08 - uli

Line: 1 to 1
 
META TOPICPARENT name="WebHome"

Solutions to the exercises

Line: 32 to 32
 
    • if argv[1] is "write", make sure argc is exactly 4
    • convert the pin number from string to integer. You may be tempted to use atoi() but you must not, because atoi() does not check for conversion errors. Use strtol() instead.
    • Make sure the converted pin number is in the range 0..7
      For the "read" case we are done with our checks here
Changed:
<
<
    • for the "write" case convert the logic level and make sure you get either 0 or 1

>
>
    • for the "write" case convert the logic level and make sure you get either 0 or 1
 https://iotworkshop.africa/pub/Embedded_Systems/SolutionsToTheExercises/leds.tar.gz

Added:
>
>
In addition to the solutions on the Raspberry Pi I wrote a simple Qt GUI:

https://iotworkshop.africa/pub/Embedded_Systems/SolutionsToTheExercises/QtLED.tar.gz

 
  • Solutions to the exercises on switches

    These exercises have also been skipped because of lack of time but I attach the solution codes nevertheless such that you can have a look at them and/or use them in a future course

https://iotworkshop.africa/pub/Embedded_Systems/SolutionsToTheExercises/switches.tar.gz

Line: 90 to 95
 
META FILEATTACHMENT attachment="pigpiod" attr="" comment="" date="1509556508" name="pigpiod" path="pigpiod" size="3299" user="uli" version="1"
META FILEATTACHMENT attachment="bcm2835-1.52.tar.gz" attr="" comment="" date="1509696255" name="bcm2835-1.52.tar.gz" path="bcm2835-1.52.tar.gz" size="640761" user="uli" version="1"
META FILEATTACHMENT attachment="pulseGen_bcm2835.tar.gz" attr="" comment="" date="1509696255" name="pulseGen_bcm2835.tar.gz" path="pulseGen_bcm2835.tar.gz" size="8168" user="uli" version="1"
Added:
>
>
META FILEATTACHMENT attachment="QtLED.tar.gz" attr="" comment="" date="1510165414" name="QtLED.tar.gz" path="QtLED.tar.gz" size="3323125" user="uli" version="1"
 
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