-
Notifications
You must be signed in to change notification settings - Fork 24
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
changing the SDA/SCL pins #11
Comments
This sounds like a good question for RFDuino, they must have something 'different' that makes it not Arduino compatible :) |
not sure, I've been grinding through this all day now, As the I2C scanner works, trellis is discovered fine on the RFduino using arduino code, but I'm not getting any response from the trellis using the trellis library. I don't know where to check for the I2C pinout in trellis, how can I be sure it's using the SDA/SCL? I tested the signal using using a scope ... and nothing's on the line, while signal clear on my other test. so simple question is, how to force trellis to use predefined SDL/SCA pins? wireless trellis you know :) would be cool! EDIT: I started a parallel thread on the RFDuino forum |
It works if you connect to the default pins for SCL and SDA which is pins 5 and 6 on the RFduino. If you want to change locations to 3 and 4 then you have to put the Wire.beginOnPins(SCLpin, SDApin); in the library, not the setup() since that is where Wire.begin is initiated. |
@tolson2000 I can confirm it works now! I did use the default 5 SCL, 6 SDA pins |
tolson2000 can you please explain where Wire.beginOnPins(SCLpin, SDApin) must be written in the library? |
Replace the Wire.begin() with Wire.beginOnPins(SCLpin, SDApin).
void Adafruit_Trellis::begin(uint8_t_addr = 0x70) {
i2c_addr = _addr;
#Wire.begin();
Wire.beginOnPins(3,4); #for example
Wire.beginTransmission(i2c_addr);
* * *
…On 11/9/18 1:49 PM, Visergrass wrote:
tolson2000 can you please explain where Wire.beginOnPins(SCLpin,
SDApin) must be written in the library?
Thank you
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIrlX4CuS97ox9_aV0q1HFuAUoVkrkClks5utepygaJpZM4FrlJp>.
|
Hi @tolson2000 Thanks! |
Hi @bigoper I am curious. Are you still using the RFduino somehow? |
@tolson2000 I'm was trying to get Mongoose-os (limited javascript) with ESP8266 (NodeMCu v1 Lolin) to work with the SSD1306 library. I gave up on Mongoose-os, and went back to Espressif :) Avi. |
To those who want to change the default I2C connections using Adafruit_SSD1306.h lib, try the following: Chinese displays only: Then, after this line on your setup function So, your code should look like this: #define SCREEN_WIDTH 128 // OLED display width, in pixels // Declaration for an SSD1306 display connected to I2C (SDA, SCL pins) .... void setup() { // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally |
Thank you @4r53N1ck, this worked for me.
|
Trellistest compiles and uploads works for the RFduino, although I don't know where to set the SDA and SCL pins. So I added
in the beginning and
in void setup()
but still no light. 3.3V not enough to power the LEDS? my Trellis works on a regular arduino. Or is it a pinout problem? can I set the SCL/SDA pins somewhere in the trellissetup? The serial output shows the test code so that means the SCL/SDA is working right?
would it be safe for my rfduino to connect the 5V pin to a 5V power source or will the SDA/SCL pins be fried?
thanks
The text was updated successfully, but these errors were encountered: