[arm-allstar] SPI support on Pi3?

Elliott L kilocharlie8 at gmail.com
Mon May 21 18:21:17 EST 2018


For anyone wondering how to do this, the steps are very simple.

1. Modify the file /boot/config.txt and add the following line (enables SPI
and I2C -- I2C is not explicitly needed but I figured why not):
dtparam=i2c=on,i2s=on,spi=on
2. Reboot
3. Compile this code to test out your MPC3008 ADC:
http://shaunsbennett.com/piblog/?p=266
(incidentally, this website shows the most basic way to connect the ADC to
the Pi -- no components needed for basic operation, although input
filtering and power filtering would certainly help).
4. Run the resulting output executable as root. The only argument needed is
"all", which will poll all the ADC's channels and return the data.

I am now able to read signal strength (s-meter) from my GE Mastr Exec II
repeater. Once I get the circuit and code tuned properly, I'll implement a
DTMF to announce the signal strength over the air, which I think will be
pretty cool. I seem to recall a popular repeater controller in the 80s that
could do this, and it was very fun to use.

73,

--E

On Mon, May 21, 2018 at 9:12 AM Elliott L <kilocharlie8 at gmail.com> wrote:

> Hi Doug,
>
> Thank you very much, this looks promising.
>
> Also, a big thanks to you and your team on this latest release. The
> install and setup procedure is quite refined!
>
> 73,
>
> --E
>
> On Mon, May 21, 2018 at 12:21 AM "Doug Crompton via arm-allstar" <
> arm-allstar at hamvoip.org> wrote:
>
>> Elliott,
>>
>>   This has to be enabled in /boot/config.txt.  See the
>> /boot/overlays/README.
>>
>>
>> *73 Doug*
>>
>> *WA3DSP*
>>
>> *http://www.crompton.com/hamradio <http://www.crompton.com/hamradio>*
>>
>>
>>
>> On Mon, May 21, 2018 at 2:52 AM, "Elliott via arm-allstar" <
>> arm-allstar at hamvoip.org> wrote:
>>
>> > Hi All,
>> >
>> > I would like to read out a number of analog voltages using the MCP3008.
>> I
>> > have the code working from some previous Pi projects. However, when I
>> run
>> > either the included gpio command (“gpio load spi”) or my own code, I
>> > receive the same error:
>> >
>> > gpio: Unable to load/unload modules as this Pi has the device tree
>> > enables. You need to run the raspi-confit program (as root) and select
>> the
>> > modules (SPI or I2C) that you wish to load/unload there and reboot.
>> >
>> > Any suggestions? I have the latest updates and I am using a Pi3B (not
>> the
>> > “plus” model).
>> >
>> > Thanks very much,
>> >
>> > --E
>> > W6EL
>> >
>> > _______________________________________________
>> >
>> > arm-allstar mailing list
>> > arm-allstar at hamvoip.org
>> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>> >
>> > Visit the BBB and RPi2/3 web page - http://hamvoip.org
>> _______________________________________________
>>
>> arm-allstar mailing list
>> arm-allstar at hamvoip.org
>> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>>
>> Visit the BBB and RPi2/3 web page - http://hamvoip.org
>
>


More information about the arm-allstar mailing list