Porting SPI/I2C device logic from Arduino/C code to Q2W/Raspberry Python code

106 views
Skip to first unread message

Piotr Maliński

unread,
Aug 21, 2013, 5:51:15 PM8/21/13
to quick2wi...@googlegroups.com
I have a CYWM6935 radio module which is popular for wireless spectrum analyzers. It's SPI based and there is Atmega or Arduino code. I also have some Chinese Arduino-compatible boards like I2C LCD display. LiquidCrystal supports it but it's not Python or Raspberry.

So my question is would be doable/"easy" to port the logic to Raspberry using Q2W Interface Board and its Python library? I've seen at least few SPI libraries for Raspberry itself, but not very detailed. So what would be the best solution?

Andrew Scheller

unread,
Aug 21, 2013, 11:02:38 PM8/21/13
to quick2wi...@googlegroups.com
In principle it should be doable, yes. I've not dabbled with SPI code
on RaspberryPi myself yet so can't offer any advice on the choice of
libraries.

Don't forget that Arduino stuff is typically 5V interface level, but
all the Raspi IO pins are at 3.3V level, so depending on the hardware
you're using you may need voltage logic level converters. And Raspi is
running a "full OS" so if there's any particularly high-speed stuff
you need to do, Arduino (which doesn't have any OS "getting in the
way") may remain more suitable. Things using an SPI interface are
typically higher-speed than things with an I2C interface.

Don't forget to have a good rummage around in
www.raspberrypi.org/phpBB3/viewforum.php?f=44 ;-)
And there's a few useful bits'n'bobs on the wiki:
http://elinux.org/RPi_Hardware
http://elinux.org/RPi_Low-level_peripherals
http://elinux.org/RPi_SPI

Andrew
> --
> You received this message because you are subscribed to the Google Groups
> "Quick2Wire Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to quick2wire-use...@googlegroups.com.
> Visit this group at http://groups.google.com/group/quick2wire-users.
> For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages