From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 10 Mar 2016 03:53:31 +0000 From: "Brian L. Stuart" To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <801552123.5703952.1457582011484.JavaMail.yahoo@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit References: <801552123.5703952.1457582011484.JavaMail.yahoo.ref@mail.yahoo.com> Subject: Re: [9fans] Pi Hats and i2c Topicbox-Message-UUID: 8ac1a25c-ead9-11e9-9d60-3106f5b1d025 On Wed, 3/9/16, Anthony Sorace wrote: > Anyone have any example code using the i2c interface on the pi > I can look at? I'm playing around with several of these, and am not > getting the results I expect (data getting out, but the hats aren't behaving > like they're getting the same bits I think I'm sending). > > More generally, anyone got any of these hats going? I'm > starting off with the Sense Hat, since it exposes everything > on it via the i2c. I haven't done anything with the hats, but I do have a few bits of I2C code that go along with the driver modifications I posted a little while back. The first does a little lightshow on a square LED array from Adafruit: http://cs.drexel.edu/~bls96/plan9/lightshow.c The second talks to the MMA8451 3-axis accelerometer: http://cs.drexel.edu/~bls96/plan9/mma8451sa.c This latter one illustrates the subaddressing features. BLS