Skip to content

Commit

Permalink
Change frambuffer type from int to char
Browse files Browse the repository at this point in the history
This allows the example to fit in an Arduino Uno.
  • Loading branch information
ataffanel committed Jan 8, 2020
1 parent cada28e commit 575dc44
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ int PixelScale = 3;

// Using digital pin 10 for chip select
Bitcraze_PMW3901 flow(10);
int frame[35*35]; //array to hold the framebuffer
char frame[35*35]; //array to hold the framebuffer

const PROGMEM uint16_t ironhot[] =
{0x0000,0x0000,0x0000,0x0000,0x0000,0x0020,0x0020,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// Using digital pin 10 for chip select
Bitcraze_PMW3901 flow(10);
int frame[35*35]; //array to hold the framebuffer
char frame[35*35]; //array to hold the framebuffer


void setup() {
Expand Down
2 changes: 1 addition & 1 deletion src/Bitcraze_PMW3901.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void Bitcraze_PMW3901::enableFrameBuffer()
delayMicroseconds(50);
}

void Bitcraze_PMW3901::readFrameBuffer(int *FBuffer)
void Bitcraze_PMW3901::readFrameBuffer(char *FBuffer)
{
int count = 0;
uint8_t a; //temp value for reading register
Expand Down
2 changes: 1 addition & 1 deletion src/Bitcraze_PMW3901.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Bitcraze_PMW3901 {

void readMotionCount(int16_t *deltaX, int16_t *deltaY);
void enableFrameBuffer();
void readFrameBuffer(int *FBuffer);
void readFrameBuffer(char *FBuffer);

private:
uint8_t _cs;
Expand Down

0 comments on commit 575dc44

Please sign in to comment.