Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i2C usage in Xojo #1

Open
madhav1080 opened this issue Dec 17, 2015 · 3 comments
Open

i2C usage in Xojo #1

madhav1080 opened this issue Dec 17, 2015 · 3 comments

Comments

@madhav1080
Copy link

When I try using GPIO.i2cSetup, it returns an error, also the only i2cReadReg16, i2cReadReg8 are available, i need to use DS1307 RTC for a file server I am building and have run into the problem.

Similar is the case with GPIO.spiSetup

How can these be initialized in xojo, a sample example would be a great help

@paullefebvre
Copy link
Collaborator

What is the error? I don't have any way to test this myself. Are you able to connect manually using wiringPi from the command line? You might also check out the Einhugur Pi examples, which have some enhancements to the Xojo GPIO code (http://blog.xojo.com/more-raspberry-pi-projects).

The methods on the wiringPi site (http://wiringpi.com/reference/i2c-library/) are the ones that are implemented, so I'm not sure what other method you need.

@madhav1080
Copy link
Author

Thank you for the prompt reply, yes WiringPi is working from my other
applications like python code for writing bytes & reading them out of FRAM
FM24C64 i have connected to the Pi i2c Bus.

GPIO.i2cSetup(10), throws an error, I am trying to set the Device ID,

Cant access the functions such as i2Cwrite, i2Cread, spi

A example for i2c, SPi would be a great help, how do i first setup i2c &
spi in Xojo, they are already enable through Rasp-config

Madhav Tenneti

Managing Director

@@@@@@@@@@@@@@@@@@@@@@@@@@

Spectrochem Instruments Pvt. Ltd.

B-23 Huda Complex, Saroornagar

Hyderabad, Andhra Pradesh

India 500 035

Phones: +91 402 420 1570 – 72 (3 Lines)

Fax: +91 402 420 1572

url: www.spectrochemindia.com

@@@@@@@@@@@@@@@@@@@@@@@@@@

Instrumentation Through Innovation

Our Home Automation, A customization of user convenience

On Thu, Dec 17, 2015 at 7:10 PM, Paul Lefebvre notifications@github.com
wrote:

What is the error? I don't have any way to test this myself. Are you able
to connect manually using wiringPi from the command line? You might also
check out the Einhugur Pi examples, which have some enhancements to the
Xojo GPIO code (http://blog.xojo.com/more-raspberry-pi-projects).

The methods on the wiringPi site (
http://wiringpi.com/reference/i2c-library/) are the ones that are
implemented, so I'm not sure what other method you need.


Reply to this email directly or view it on GitHub
#1 (comment).

@paullefebvre
Copy link
Collaborator

The Xojo GPIO library looks to me like it is correctly mapping to the wiringPi library calls, but I don't have a way to test it myself. Perhaps you have to run as Sudo?

You might also try asking in the Xojo Raspberry Pi forum to see if anyone else has tried this.
https://forum.xojo.com/conversations/raspberry-pi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants