Versions Compared

Key

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

...

iocontrol_serialout_fsm1

  • behavior:
    • modified from iocontrol_serialout
    • implement a FSM (finite state machine) to control sequential printing of messages
  • pre-requisite:
    • iocontrol_serialout
  • concepts:
    • add a variable for state, count from 0 to 2 and goes back to 0 again
    • use switch statement
    • effect of "interval" on duration for each state
    • prepare for complex case of finite state machine
    Refer to https://www.designandmake.org/pages/viewpage.action?pageId=232799560#Lecture3:ComputingSystemsandProgramming-

iocontrol_serialout_

...

fsm2

  • behavior

...

iocontrol_serialout_fsm2

  • behavior:
    • repeat the print sequence in iocontrol_serialout_fsm1 for a number of times
  • pre-requisite:
    • iocontrol_serialout_fsm1
  • concepts:
    • extended from iocontrol_serialout
    • add another variable to control repeat count

...

binout_timedwrite

binout_serialin_timedwrite

binout_serialin_timedwrite

binout_play_oneseq

binout_play_oneseq

  •  behavior:
    • playback a sequence on IO12
     behavior:
    • playback a sequence on IO12 using GPIO output, at t=2000ms after reset, for 2 times
  • pre-requisite:
    • binout_timedwrite
  • concepts:
    • BinOutControl
      • playRelTime
      • isXXX(_status) - relating to sequence
    •  BinOutSequence
      • addSetState( duration, state)
  •  extension
    • play sequence for one time and two times to illustrate difference between "OneSeqEnded" and "AllSeqEnded"
    Refer to https://www.designandmake.org/pages/viewpage.action?pageId=232799560#Lecture3:ComputingSystemsandProgramming-

binout_play_

...

binout_play_altseq

binout_serialin_playseq_immed

binout_serialin_playseq_follow

binout_serialin_playseq_follow

binin_changetime

adc_read

  • circuit:
  • behavior:
    • joystick analog outputs connect to IO00 and IO01 respectively
    • read analog outputs every 100ms and outputs on Serial Monitor
  • pre-requisite:
    • iocontrol_serialout
  • concepts
    • ADCControl
      • init - adc_index (must be 1), pin index (must be 0 to 4)
      • read
      • getMaxValue

...