Skip to content

Example 7 variable type mis-match #45

Closed
@biomurph

Description

@biomurph

This is a simple and quite unintelligent bug.
It's just hanging out there right in the middle of everything... so obvious... line 50

byte sampleRate = 400; //Options: 50, 100, 200, 400, 800, 1000, 1600, 3200

But a byte only counts to 255 and then rolls over to 0.
So any sample rate over 200 would be...

Gotta say, I was pulling my hair out with the o'scope on the bench and everything.
The .setup() receives an int in the sampleRate space. Easy fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions