9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Brian L. Stuart" <blstuart@bellsouth.net>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Pi Hats and i2c
Date: Thu, 10 Mar 2016 03:53:31 +0000	[thread overview]
Message-ID: <801552123.5703952.1457582011484.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: <801552123.5703952.1457582011484.JavaMail.yahoo.ref@mail.yahoo.com>

On Wed, 3/9/16, Anthony Sorace <a@9srv.net> 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



       reply	other threads:[~2016-03-10  3:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <801552123.5703952.1457582011484.JavaMail.yahoo.ref@mail.yahoo.com>
2016-03-10  3:53 ` Brian L. Stuart [this message]
2016-03-10  4:15   ` Vasudev Kamath
     [not found] <1571845562.5740270.1457585385261.JavaMail.yahoo.ref@mail.yahoo.com>
2016-03-10  4:49 ` Brian L. Stuart
2016-03-10  5:04   ` Vasudev Kamath
2016-03-09 20:39 Anthony Sorace

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=801552123.5703952.1457582011484.JavaMail.yahoo@mail.yahoo.com \
    --to=blstuart@bellsouth.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).