I/O library #3985

Merged
merged 11 commits into from Oct 13, 2015

Conversation

Projects
None yet
4 participants
@gohai
Contributor

gohai commented Oct 11, 2015

Hi @benfry @REAS!

This is the first chunk of the I/O library. I am happy with the interfaces and the source-file documentation. Will do additional testing in the afternoon and rework the example sketches. Those will come as a separate chunk later today.

Best
G

gohai added some commits Oct 11, 2015

I/O: Build on ARM
Note: This still includes the io directory on all other platforms' output, but the jar won't be built on those, and the library won't show up in the menus.
I/O: Improve messaging when user doesn't have permissions to write to…
… LEDs

This is e.g. the case with the newly released Raspbian 2015-09-24.

@gohai gohai changed the title from I/O library, part 1 to I/O library Oct 11, 2015

@gohai

This comment has been minimized.

Show comment
Hide comment
@gohai

gohai Oct 11, 2015

Contributor

Added (revamped) the following examples to this tree as well:

  • make a LED blink (classic..)
  • color an ellipse according to the state of an input pin
  • binary counting using the PI's on-board LEDs
  • jump into a custom interrupt handler when the state of an input pin changes
  • control an analog-to-digital converter via I2C
  • the same, but done in a fun OOP way
  • get a compass heading via I2C and draw it on the screen
  • color the screen background with values from a very fast SPI digital-to-analog-converter
  • and again, also done in an OOP way
Contributor

gohai commented Oct 11, 2015

Added (revamped) the following examples to this tree as well:

  • make a LED blink (classic..)
  • color an ellipse according to the state of an input pin
  • binary counting using the PI's on-board LEDs
  • jump into a custom interrupt handler when the state of an input pin changes
  • control an analog-to-digital converter via I2C
  • the same, but done in a fun OOP way
  • get a compass heading via I2C and draw it on the screen
  • color the screen background with values from a very fast SPI digital-to-analog-converter
  • and again, also done in an OOP way

gohai added some commits Oct 12, 2015

I/O: Make I2C & SPI accept ints for write()
This makes everyone's sketches a bit lighter, since it is not longer necessary to explicitly cast to byte or call byte(). Instead, we throw an exception if the value does not fit into the byte.
I/O: Move GPIO examples away from I2C pins
It appears as if using the I2C pins for GPIO requires a restart of the Raspberry Pi before the I2C interface can be used again. Play safe and move the examples to pins that aren't used for anything else.

benfry added a commit that referenced this pull request Oct 13, 2015

@benfry benfry merged commit 76c24be into processing:master Oct 13, 2015

@gohai gohai deleted the gohai:for-ben-12 branch Oct 13, 2015

@REAS

This comment has been minimized.

Show comment
Hide comment
@REAS

REAS Oct 13, 2015

Member

Hey gents, I'm writing an email to you both about some details...

Member

REAS commented Oct 13, 2015

Hey gents, I'm writing an email to you both about some details...

@gohai

This comment has been minimized.

Show comment
Hide comment
@gohai

gohai Oct 13, 2015

Contributor

Awesome, thanks Casey! I'll have some time over next couple of days to work on documentation or whatever else you find is still missing/lacking!

Contributor

gohai commented Oct 13, 2015

Awesome, thanks Casey! I'll have some time over next couple of days to work on documentation or whatever else you find is still missing/lacking!

@shiffman

This comment has been minimized.

Show comment
Hide comment
@shiffman

shiffman Oct 15, 2015

Member

Would love to be in the loop, am planning a Pi workshop using this at ITP hopefully in November (or whenever appropriate!)

Member

shiffman commented Oct 15, 2015

Would love to be in the loop, am planning a Pi workshop using this at ITP hopefully in November (or whenever appropriate!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment