-
Notifications
You must be signed in to change notification settings - Fork 33
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
Get i2c address #235
Comments
There is no way to scan i2c addresses in the manner that |
Is this something that would mostly happen on the SAMD21 (the C firmware) with |
Yes, that's correct. The JS API would just be a wrapper around some command that is sent to SAMD21, the command would do whatever test is necessary on the SAMD21 and respond with the outcome. |
Would it not be possible to loop over all I2C addresses calling i2cConfig and then i2cReadOnce for each address. After calling This is probably a bit of hack and it may leave state.i2c full of junk that's not needed. Reading information from a device may also have unwanted side effects on the device. On the other hand it might work! It's probably of little help, but i2c-bus has scan and scanSync methods that use the SMBus Receive Byte protocol to scan for devices. The Linux |
@fivdi the JS runs on the mediatek mt7620n and communicates with the samd21 via domain socket. The entire i2c stack exists on samd21 and there is presently no response produced when a program attempts to write (via a message sent over the socket) to a non-existent i2c peripheral address. const tessel = require('tessel');
const txb = new Buffer([0xff]);
const i2c = new tessel.port.A.I2C(0x01);
i2c.transfer(txb, 1, (error, data) => {
// Never executed, because no response ever occurs.
}); |
Originally filed here: tessel/t2-cli#1257
@opkiler22789:
The text was updated successfully, but these errors were encountered: