Skip to content

Error in example code found in Gizmo Guide? #7

Description

@PhotonBandit

Is there an error in the posted code in the "Arduino Programming for Gizmo" tutorial at this link...
https://bestedu.bestrobotics.org/courses/arduino-programming-for-gizmo/lessons/how-to-read-the-gamepad-2/

Here is the code...
`#include <Gizmo.h>

Gizmo gizmo;

void setup() {
gizmo.begin();
}

void loop() {
Serial.println(gizmo.getButton(GIZMO_BUTTON_A));
delay(1000);
}`

Does there need to be a call to "gizmo.refresh();" to get the current state of the A-Button? I'm only able to see by A-button changing values when I include this line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions