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

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Kenshow
Level 8
Level 8
Distributor - Marubun (Japan)
50 solutions authored 25 solutions authored 10 solutions authored

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

1 Reply
Takashi_M
Moderator
Moderator
Moderator
1000 replies posted 500 solutions authored 750 replies posted

Dear Kenshow-san,

Thank you very much for sharing your Code Example.

We appreciate your contribution for this.

Best regards.