<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tan Chun Siong</title>
    <description>The latest articles on DEV Community by Tan Chun Siong (@tanchunsiong).</description>
    <link>https://dev.to/tanchunsiong</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F888322%2F6f8ea967-1b4d-4489-9121-13cbfd81d12e.jpg</url>
      <title>DEV Community: Tan Chun Siong</title>
      <link>https://dev.to/tanchunsiong</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tanchunsiong"/>
    <language>en</language>
    <item>
      <title>Zoom SDK Powered Claw Machine</title>
      <dc:creator>Tan Chun Siong</dc:creator>
      <pubDate>Thu, 17 Nov 2022 09:06:29 +0000</pubDate>
      <link>https://dev.to/zoom/zoom-sdk-powered-claw-machine-5ci9</link>
      <guid>https://dev.to/zoom/zoom-sdk-powered-claw-machine-5ci9</guid>
      <description>&lt;h1&gt;
  
  
  Description
&lt;/h1&gt;

&lt;p&gt;Zoom Video SDK allow developers to easily and quickly develop video rich applications to support different scenarios, across multiple platforms (The list below is accurate as of Oct 2022).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React Native&lt;/li&gt;
&lt;li&gt;iOS&lt;/li&gt;
&lt;li&gt;Android&lt;/li&gt;
&lt;li&gt;Windows&lt;/li&gt;
&lt;li&gt;MacOS&lt;/li&gt;
&lt;li&gt;Web
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are many scenarios which video would plays an important role, example telehealth, remote learning, remote assistance and much more...&lt;/p&gt;

&lt;h1&gt;
  
  
  Goals
&lt;/h1&gt;

&lt;p&gt;In this multi-part guide you will learn to build a Zoom Video SDK powered Claw Machine, which would be playable over a web browser.&lt;/p&gt;

&lt;p&gt;This guide is broken down into :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Selecting a claw machine / claw game&lt;/li&gt;
&lt;li&gt;Procuring components for this build&lt;/li&gt;
&lt;li&gt;Modifications to electronics &lt;/li&gt;
&lt;li&gt;Introduction to Android on Raspberry Pi

&lt;ul&gt;
&lt;li&gt;Operating Systems&lt;/li&gt;
&lt;li&gt;GPIO Controls&lt;/li&gt;
&lt;li&gt;Android Studio&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Programming with Zoom Video SDK for Android&lt;/li&gt;

&lt;li&gt;Programming with Zoom Video SDK for Web&lt;/li&gt;

&lt;li&gt;Finishing Touches&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63l25d15harr5yjot1j3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F63l25d15harr5yjot1j3.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Terminologies
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Transistor&lt;/strong&gt; semiconductor device used to amplify or switch electrical signals and power&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Protoboard&lt;/strong&gt; construction base used to build semi-permanent prototypes of electronic circuits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Raspberry Pi&lt;/strong&gt; small single-board computers (SBCs) developed in the United Kingdom by the Raspberry Pi Foundation in association with Broadcom&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CSI MIPI&lt;/strong&gt; Camera Serial Interface (CSI) is a specification of the Mobile Industry Processor Interface (MIPI) Alliance. It defines an interface between a camera and a host processor. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;UVC USB Camera&lt;/strong&gt; USB video device class (also USB video class or UVC) is a USB device class that describes devices capable of streaming video like webcams, digital camcorders, transcoders, analog video converters and still-image cameras.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PCB Board&lt;/strong&gt; medium used in electrical and electronic engineering to connect electronic components to one another in a controlled manner.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Step by Step Guide
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Prerequisites
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;IDE or Text Editor of your choice (Visual Studio, VS Code, Sublime Text etc..)

&lt;ul&gt;
&lt;li&gt;I'm using Visual Studio Code on macOS for this guide&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Android Studio&lt;/li&gt;

&lt;li&gt;Basic Soldering Skills&lt;/li&gt;

&lt;li&gt;Zoom Video SDK Account refer to this guide &lt;a href="https://marketplace.zoom.us/docs/sdk/video/developer-accounts/" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;a href="https://marketplace.zoom.us/docs/sdk/video/developer-accounts/" rel="noopener noreferrer"&gt;https://marketplace.zoom.us/docs/sdk/video/developer-accounts/&lt;/a&gt;
&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  Selecting a Claw Machine
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwiur5cvwdy0ljr7nt3jc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwiur5cvwdy0ljr7nt3jc.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For this build, we are looking for a small compact machine. The key requirement which I had in mind are &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;USB Powered&lt;/li&gt;
&lt;li&gt;Dedicated catch / claw button&lt;/li&gt;
&lt;li&gt;Ease of modification of PCB board&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However ease of modification can only be determined after purchase.&lt;/p&gt;

&lt;p&gt;If you would like to use the same build, you might be able to find it here &lt;a href="https://item.taobao.com/item.htm?spm=a1z09.2.0.0.e6b32e8dNhzp3j&amp;amp;id=678427544225&amp;amp;_u=42lt0qrp29bf" rel="noopener noreferrer"&gt;E-commerce site, note that this site is in mandarin&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Procuring Components for the build
&lt;/h3&gt;

&lt;p&gt;-Raspberry Pi 3 or Pi 4&lt;br&gt;
-MicroSD Card&lt;br&gt;
-CSI MIPI Camera or UVC USB Camera (Fisheye)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzd0eyclyjxeox8gykzv4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzd0eyclyjxeox8gykzv4.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-HDMI LCD Screen&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fblzf9ywrv90i9vq6oyem.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fblzf9ywrv90i9vq6oyem.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-5V USB Powered LED Strip&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjculmregggxxnzqq8tm9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjculmregggxxnzqq8tm9.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-Dupont Header Wires&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhez65ehw9bo0oqbp36vn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhez65ehw9bo0oqbp36vn.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-Protoboard for Raspberry Pi&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1zaqoehpb70w4jt3u2z3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1zaqoehpb70w4jt3u2z3.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;-Optional USB Microphone and Microphone&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fauaun855c3sme9yihcra.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fauaun855c3sme9yihcra.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Modifications to electronics
&lt;/h3&gt;

&lt;p&gt;The intention for this section, is to enable our android application to take control of the claw machine. These control are start game, move left, move right, move back, move forward, and catch.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9yuosppmcfxqaioaahng.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9yuosppmcfxqaioaahng.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If we disassemble the claw machine to take a look at the PCB board, we quickly discover the movement are triggered by capacitive touch. This is similar technology used by certain build of keyboards. Those marked with yellow stars denotes presence of test points, which we can conveniently solder our logic wires.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figzsz8j0aedlpho4b6ne.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figzsz8j0aedlpho4b6ne.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
1 - 3.3V power source&lt;br&gt;
2 - Used to detect successful catch via IR sensor (unused for this guide)&lt;br&gt;
a - Connect with 1 to move up&lt;br&gt;
b - Connect with 1 to move left&lt;br&gt;
c - Connect with 1 to move down&lt;br&gt;
d - Connect with 1 to move right&lt;br&gt;
e - Connect with 1 to catch&lt;br&gt;
f and g - Connect with each other to start a new game&lt;/p&gt;

&lt;p&gt;Connecting or shorting 2 points can be achieve in various manner. You can choose to either use a transistor or an optocoupler. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0g1xjhpj3d9qsm0136rw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0g1xjhpj3d9qsm0136rw.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjiwl066fo16uqqoggdso.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjiwl066fo16uqqoggdso.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Base for each transistor are then directly linked to the GPIO on the Raspberry Pi. Assuming "start" is connected to GPIO Pin 6. Whenever I set Pin 6 (or any other Pins you are using) to Output and High, it will "start" the game on the claw machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz8x9hq3qhe7w0j6oy71e.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz8x9hq3qhe7w0j6oy71e.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Introduction to Android on Raspberry Pi
&lt;/h3&gt;

&lt;p&gt;The version of Android which I'm using on Raspberry Pi comes from Lineage OS. The version which runs on Raspberry Pi comes from an author who runs the website &lt;a href="https://konstakang.com/" rel="noopener noreferrer"&gt;https://konstakang.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From my own experience, this distribution has pretty good GPIO support, driver supports for USB UVC camera, and driver support for USB Speakers + Microphone.&lt;/p&gt;

&lt;p&gt;You want want to refer to &lt;a href="https://konstakang.com/" rel="noopener noreferrer"&gt;https://konstakang.com/&lt;/a&gt; on how to prepare LineageOS on your MicroSD Card.&lt;/p&gt;
&lt;h3&gt;
  
  
  Zoom Video SDK for Android
&lt;/h3&gt;

&lt;p&gt;Download Zoom Video SDK from &lt;a href="https://marketplace.zoom.us" rel="noopener noreferrer"&gt;https://marketplace.zoom.us&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkuzizz2h5b5fony69hah.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkuzizz2h5b5fony69hah.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The latest version as of Oct 2022 is v1.5.1 for Android.&lt;/p&gt;

&lt;p&gt;Download, extract and open up the &lt;code&gt;mobilertc-android&lt;/code&gt; folder on Android Studio&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add JWT Token to &lt;code&gt;Constants.java&lt;/code&gt;
Refer to &lt;a href="https://marketplace.zoom.us/docs/sdk/video/auth/" rel="noopener noreferrer"&gt;https://marketplace.zoom.us/docs/sdk/video/auth/&lt;/a&gt; on how to generate your JWT token with your SDK Key and Secret Key&lt;/li&gt;
&lt;li&gt;Handle events from Command Channels
Look for &lt;code&gt;BaseMeetingActivity.java&lt;/code&gt; and search for &lt;code&gt;public void onCommandReceived(ZoomVideoSDKUser sender, String strCmd)&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This event handler will receive custom command sent from the web application (which we will create in the next section).&lt;/p&gt;

&lt;p&gt;Here's the code snippet&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  try {

            switch (strCmd.toLowerCase()) {
                case "start":
                case "s": {

                    startGame();
                }
                break;

                case "catch":
                case "c": {

                    catchToy();
                }
                break;

                case "up":
                case "u": {

                    moveForward();
                }
                break;

                case "down":
                case "d": {
                    moveBackward();
                }
                break;

                case "left":
                case "l": {
                    moveLeft();

                }
                break;

                case "right":
                case "r": {
                    moveRight();
                }



            }
        } catch (Exception ex) {
            ex.toString();

        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Call GPIO related commands &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm using a pre-written GPIO library which can be found below. I've created a class named GPIO.java&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/lpbas/bca095e23627c7d53addba0a01d6cc09" rel="noopener noreferrer"&gt;https://gist.github.com/lpbas/bca095e23627c7d53addba0a01d6cc09&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Within the &lt;code&gt;onCreate()&lt;/code&gt; method found in &lt;code&gt;BaseMeetingActivity.java&lt;/code&gt; I'll call the below method to initialize the pins. Notice they are set as DIRECTION_OUT&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;private void initializePins() {

        pin6StartGameOut=new GPIO(6,GPIO.DIRECTION_OUT);
        pin27MoveUpOut=new GPIO(27,GPIO.DIRECTION_OUT);
        pin22MoveDownOut=new GPIO(22,GPIO.DIRECTION_OUT);
        pin23MoveLeftOut=new GPIO(23,GPIO.DIRECTION_OUT);
        pin24MoveRightOut=new GPIO(24,GPIO.DIRECTION_OUT);
        pin12CatchOut=new GPIO(12,GPIO.DIRECTION_OUT);

    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As startGame(), catchToy(), moveLeft(), moveRight(), moveUp() and moveDown() have similar codebase with slight variations, I've just added one of them below.&lt;/p&gt;

&lt;p&gt;GPIO.VALUE_ON to send a high value to the transistor, which then turns on the switch for start game.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   public void startGame(){
        pin6StartGameOut.setValue(GPIO.VALUE_ON);
        try {

            new Handler().postDelayed(new Runnable()
            {
                @Override
                public void run()
                {
                    pin6StartGameOut.setValue(GPIO.VALUE_OFF);

                }
            },125);
        }
        catch (Exception ex){
            ex.toString();

        }


    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When attempting to run / deploy this on the Raspberry Pi over ADB, you will be prompted for root / SU access. This is normal, as you need root access for GPIO.&lt;/p&gt;

&lt;p&gt;Use an arbitrary session name and set a password for your session. We will need this session name when connecting to the same meeting/session from the web.&lt;/p&gt;

&lt;h3&gt;
  
  
  Zoom Video SDK for Web
&lt;/h3&gt;

&lt;p&gt;My fellow zoomies &lt;a class="mentioned-user" href="https://dev.to/jenzushsu"&gt;@jenzushsu&lt;/a&gt; has written a web application based off &lt;a class="mentioned-user" href="https://dev.to/tommygaessler"&gt;@tommygaessler&lt;/a&gt; sample 1 to 1 video chat sample code, which we will be using as a bootstrap.&lt;br&gt;
&lt;a href="https://github.com/tommygaessler/vsdktest" rel="noopener noreferrer"&gt;https://github.com/tommygaessler/vsdktest&lt;/a&gt;. &lt;br&gt;
The latest version as of Oct 2022 is v1.5.1 for Web.&lt;/p&gt;

&lt;p&gt;Below is the screenshot of the sample 1 to 1 video chat, with responsive web design approach in place to support different form factors to join from the web.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1o69zajnzty46myjk373.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1o69zajnzty46myjk373.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below is the high level flow of events:&lt;br&gt;
The claw machine starts a video session, as a host, from the Android app&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The participant or “player” will join from a mobile web browser to play the game.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There is a maximum of 2 participants (including the host) at any single point of time. The sample app will take care of new participants joining when the video session is at capacity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In order for the participant to play the claw machine, additional buttons are added on top of the existing buttons.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz9mwyu1fyayitgquai5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz9mwyu1fyayitgquai5g.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1 - Start Game / Catch Toy button&lt;br&gt;
2 - Virtual Joystick / Control (nippleJS &lt;a href="https://github.com/yoannmoinet/nipplejs" rel="noopener noreferrer"&gt;https://github.com/yoannmoinet/nipplejs&lt;/a&gt;) &lt;br&gt;
3 - Game Timer (Animated Countdown Timer &lt;a href="https://css-tricks.com/how-to-create-an-animated-countdown-timer-with-html-css-and-javascript/" rel="noopener noreferrer"&gt;https://css-tricks.com/how-to-create-an-animated-countdown-timer-with-html-css-and-javascript/&lt;/a&gt;) &lt;/p&gt;

&lt;p&gt;You can reference the switch block from the Android to create similar javascript functions to trigger the respective actions (e.g. start game, catch toy). Below is a sample code snippet for startGame()&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
function startGame() {
  document.querySelector('#stopGame').style.display = 'inline-block'
  document.querySelector('#startGame').style.display = 'none'

  const chat = zmClient.getChatClient();
  chat.sendToAll('s')
  const commandChannel = zmClient.getCommandClient();
  commandChannel.send('s')
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using either the Zoom Video SDK Chat Client or Command Channel to send custom commands to the host, the event handler will receive to execute the respective code blocks.&lt;/p&gt;

&lt;p&gt;The rest will depend on your own creativity on dynamically having a refreshed timer whenever a game is started or to handle the range of the virtual joystick in moving the claw. &lt;/p&gt;

&lt;h3&gt;
  
  
  Finishing Touches
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvu70acbutna3a2bufkto.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvu70acbutna3a2bufkto.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Customize it with a little stickers, and USB 5V LED strip, and you are ready to go!&lt;/p&gt;

</description>
      <category>claw</category>
      <category>machine</category>
      <category>zoom</category>
      <category>sdk</category>
    </item>
  </channel>
</rss>
