Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Extra Pin for Fan Control #9957
    BrockDorf
    Participant

    Hi..i tried this using pyhthon and it doesn’t provide a switch case function. You can set it up as a dictionary for lookup (associative array), or what most do is just use an “if..elif..else” block to provide the same thing if you don’t have too many cases to deal with.This is part of a Python script I use to show the current CPU temp on a 24 segment bar graph. The temp is displayed on the first 8 bars of the graph and each “if/elif/else” works as a case statement to turn on the correct segment according to the temperature.

Viewing 1 post (of 1 total)