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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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.