1 Reply Latest reply on May 21, 2020 10:31 PM by TakashiM_61

    Let's make the dice of seven eyes with PSoC 6 (M4) CapSense version, the protagonist of the game

    NoTa_4591161

      Hi all,

       

      The electronic dice I posted last time was very popular. So, I used the switch to start and stop the dice, but this time replace it with CapSence.

       

      This example is used PSoC 6 BLE Pioneer Kit CY8CKIT-062-BLE with PSoC Creator4.2 or 4.3. I used PSoC 6 this time, but I think that PSoC 4 can also be used. If PSoC 4 is available, I will check it and upload it.

       

      The block diagram of H/W is as follows.

      1.png

      I just added CapSence to the previous H/W block.

       

      CapSence is used as switch for start and stop instead of SW2. Button0 and 1 are added.

      2.png

      The whole circuit looks like this:

      7_Cap.jpg

       

      The software flow chart is shown below. Timer is set start if Button0 is active when sw is off (= 0). If Button1 is active when sw is on (= 1), the timer period is set longer and the LED lighting is delayed. It keeps its speed for 1.5 seconds and stops lighting. Please see the attached program for details.

      3.png

      In the code example, the code of SW2 is left. If you uncomment “#define SW2” in the 12th line of main.c file, it replace with the version of SW2. This concludes the general description.

       

      Next time, I would like to design improving board, Adults are impure after all. Allowing only you set any eyes of the dice without letting your child know”. You will definitely win.

       

      Thanks,

      Kenshow