Giter Site home page Giter Site logo

Comments (10)

soundanalogous avatar soundanalogous commented on August 15, 2024 1

One other thing to try if you haven't already is to delay a couple of seconds after startup of your client application before sending the I2C_WRITE command. I'm wondering if the issue could be related to the Firmata blink sequence (series of delays) running at startup.

from arduino.

soundanalogous avatar soundanalogous commented on August 15, 2024

You may be using an i2c device that needs an auto restart at the end of the transmission (Wire.endTransmission(false)). See this issue: #82.

I have a pull request open to add this functionality. Try the i2c-restart branch and let me know if that solves the issue for you. Check the addendum to the i2c implementation here to see what you'll need to change in your Firmata client. Note bit 6 of byte 3 (restartTx) set this to 1.

from arduino.

jacobrosenthal avatar jacobrosenthal commented on August 15, 2024

What is the current default of arduino 1.0.5 endTransmission when nothing
is supplied? Im not doing anything in my sketch:

Wire.beginTransmission(LEDAddress);
Wire.write(DISP_CHAR_5X7);
Wire.write(data_);
Wire.write(time>>8); //high byte of time
Wire.write(time);//low byte of time
Wire.endTransmission();

On Mon, Nov 18, 2013 at 5:30 PM, Jeff Hoefs [email protected]:

You may be using an i2c device that needs an auto restart at the end of
the transmission (Wire.endTransmission(false)). See this issue: #82#82
.

I have a pull request #92 open
to add this functionality. Try the i2c-restart branch and let me know if
that solves the issue for you. Check the addendum to the i2c implementation
here https://github.com/firmata/protocol/blob/master/i2c.md to see what
you'll need to change in your Firmata client. Note bit 6 of byte 3
(restartTx) set this to 1.


Reply to this email directly or view it on GitHubhttps://github.com//issues/101#issuecomment-28754950
.

from arduino.

soundanalogous avatar soundanalogous commented on August 15, 2024

No parameter to endTransmission() is default so in your arduino example above that is using the default. And you have no issues running that code directly on an Arduino, you only have the issue with Firmata, correct?

from arduino.

jacobrosenthal avatar jacobrosenthal commented on August 15, 2024

Correct
On Mon, Nov 18, 2013 at 7:41 PM, Jeff Hoefs [email protected]:

running

from arduino.

soundanalogous avatar soundanalogous commented on August 15, 2024

and in your client code yours sending an I2C_CONFIG message to set up the pins, then your sending an I2C_WRITE message?

from arduino.

soundanalogous avatar soundanalogous commented on August 15, 2024

Do you have any other i2c devices you can test with? I have used the following with Firmata successfully:

blinkM rgb led
ITG3200 gyro
HMC6352 digital compass
ADXL345 accelerometer
HMC5883 magnetometer

from arduino.

jacobrosenthal avatar jacobrosenthal commented on August 15, 2024

I have a few more things Ill be testing next.

Yes Im configuring. Not that you know my under the hood implementation, but
this is the same code in my ios implementation:

[currentFirmata i2cConfig:0 data:[[NSData alloc]init]];

#define DISP_CHAR_5X7 0x80
#define LEDAddress      0x04

int time = 10000;

const unsigned char led[] = {DISP_CHAR_5X7, 'n', time>>8, time & 0xff};
NSData *data = [[NSData alloc] initWithBytes:led length:sizeof(led)];

[currentFirmata i2cRequest:WRITE address:LEDAddress data:data];
[currentFirmata i2cRequest:WRITE address:LEDAddress data:data];

Again, second call and all subsequent i2crequest calls work.

On Mon, Nov 18, 2013 at 8:44 PM, Jeff Hoefs [email protected]:

Do you have any other i2c devices you can test with? I have used the
following with Firmata successfully:

blinkM rgb led
ITG3200 gyro
HMC6352 digital compass
ADXL345 accelerometer
HMC5883 magnetometer


Reply to this email directly or view it on GitHubhttps://github.com//issues/101#issuecomment-28762874
.

from arduino.

soundanalogous avatar soundanalogous commented on August 15, 2024

please see this issue: #102. I'm pretty sure this is the same thing you brought up on the dev list. Please any additional thoughts you may have.

from arduino.

soundanalogous avatar soundanalogous commented on August 15, 2024

@jacobrosenthal do you still notice this behavior at all?

from arduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.