How to Power on the Ports in groove

Hi,

I’m using One Groove and I’m trying to power up the the ports 2/3

Jan told to me to power up, but I don’t have idea how to scrip this power up,

Thank’s

Eduard

Hi Eduard,

I added a basic sketch to the support site

http://support.sodaq.com/sodaq-one/
Scroll down to: “Base Orientation and antenna connection”

Regards,
Jan

Hi Jan,

First of all thank’s for your example. I did it and now the ports are open.
My sensors are light amb moisture, I use analogread but I saw that the values did not change if I put in a glass of water or if I put my finger on the light sensor. If I use digitalread, values are 0

Many thank’s

#define enablePin 11
const int lightPin = 2; 
const int moisturePin = 6; 
int moisturValue = 0;

void setup() {
  SerialUSB.begin(9600); 
  SerialUSB.println("Serial Begin");
  pinMode(enablePin, OUTPUT);
  digitalWrite(enablePin, HIGH);
  
}
void loop() {
  delay(2000);
  int lightValue = analogRead(lightPin); 
  delay(2000);
  moisturValue = analogRead(moisturePin);        
  delay(2000);

Can you define the pinMode of each pin you are using?

pinMode(lightPin, INPUT);
pinMode(moisturePin, INPUT);

Regards,
Jan

Hi Jan again,

I defined the pin, but the sensor reads the same values if I put in a water…I also tried read pin 6 and or 7 with the same result

best

Eduard

Hi Eduard,

I see the problem, you have to use:

const int lightPin = A2;
const int moisturePin = A6;

Regards,
Jan

Hi Jan,

Now is working!!!

Thank’s again

Eduard