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

Wire.h is not included in any examples #5288

Closed
mcspr opened this issue Oct 28, 2018 · 5 comments
Closed

Wire.h is not included in any examples #5288

mcspr opened this issue Oct 28, 2018 · 5 comments

Comments

@mcspr
Copy link
Collaborator

mcspr commented Oct 28, 2018

Related to #5226 and discussion in cb05b86#comments

As there are no .ino files referencing Wire.h compilation tests do not fail:

local sketches=$(find $srcpath -name *.ino | sort)

local sketches=$(find $srcpath -name *.ino)

https://github.com/esp8266/Arduino/tree/master/libraries/Wire/examples

In #5287 I referenced twi.h and Wire from avr core. Can those examples be copied here?
https://github.com/arduino/ArduinoCore-avr/tree/master/libraries/Wire/examples

@devyte
Copy link
Collaborator

devyte commented Oct 29, 2018

Can those examples be copied here?

Not without testing. In theory, examples that work on avr and other "simple" uCs should work on the ESP. In practice, due tothe wifi radio and tcp/ip stack, they sometimes don't due to timing differences.

Unfortunately, I don't think any of the current developers are involved with i2c at this time, so testing would need to be done by users.

@mcspr care to make a PR yourself with tested examples?

@devyte devyte added type: enhancement waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. component: examples labels Oct 29, 2018
@mcspr
Copy link
Collaborator Author

mcspr commented Nov 1, 2018

@devyte master<->slave communication seem like a straightforward test target
i.e. from avr repo: master_reader, master_writer, slave_sender, slave_receiver
in similar manner to https://github.com/esp8266/Arduino/tree/master/libraries/SPISlave/examples

two other examples are for devices which i do not have: AD5171 digital potentiometer and SRF10/SRF08 Devantech Ultrasonic Range Finder. But what I do have is DS3231

@devyte
Copy link
Collaborator

devyte commented Nov 1, 2018

Riight now we don't have any example, so whatever you have.
Now that slave support is merged, you could also propose an example with one ESP as master and another as slave talking to each other.

@devyte
Copy link
Collaborator

devyte commented Nov 23, 2018

Note: 4 Wire examples from avr core repo, master reader/writer & slave receiver/sender.
Need testing on ESP8266 connected with each other over I2C.

@devyte devyte added type: enhancement and removed waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. type: enhancement labels Nov 23, 2018
@devyte devyte self-assigned this Nov 23, 2018
@devyte
Copy link
Collaborator

devyte commented Nov 23, 2018

@suculent could I ask you to test the referenced standard examples, and add them to your #5360 ? I think your advanced example is better, but these more basic ones are standard for avr, and we should probably include them.

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

No branches or pull requests

2 participants