1
Wirelings / Re: Output Differs using Wireling Analog than ProtoTermimalShield on TinyZero?
« on: September 20, 2022, 07:33:10 PM »
Hi Réna,
Thank you so much! That was it. It works perfectly now.
Phew
May I ask, just to be clearer:
-- Can I leave out the line, #include <Wire.h> , in my code?
(and I don't need to run Wire.begin(); in my setup?)
-- Can/should I include a line:
Wireling.selectPort(0); ? or in my case Wireling.selectPort(A0); ?
As this example,
https://learn.tinycircuits.com/Wirelings/Hall-Effect_Wireling_Tutorial/
includes these lines:
I am not using I2C, so maybe better to leave out the #include <Wire.h>
But I'm not sure about why I do or do not need Wireling.selectPort(0) or (A0).
Thanks again,
Linda
Thank you so much! That was it. It works perfectly now.
Phew
May I ask, just to be clearer:
-- Can I leave out the line, #include <Wire.h> , in my code?
(and I don't need to run Wire.begin(); in my setup?)
-- Can/should I include a line:
Wireling.selectPort(0); ? or in my case Wireling.selectPort(A0); ?
As this example,
https://learn.tinycircuits.com/Wirelings/Hall-Effect_Wireling_Tutorial/
includes these lines:
Code: [Select]
#include <Wire.h> // For I2C communication
#include <Wireling.h> // For Interfacing with Wirelings
// and then in setup:
Wire.begin();
// Enable & Power Wireling
Wireling.begin();
Wireling.selectPort(0); // This must match the port the Wireling is connected to
// on the Adapter board
I am not using I2C, so maybe better to leave out the #include <Wire.h>
But I'm not sure about why I do or do not need Wireling.selectPort(0) or (A0).
Thanks again,
Linda