Home › Forums › Other Data Loggers › Seeeduino Stalker v3.0 discussion › Reply To: Seeeduino Stalker v3.0 discussion
Hello,
I’m sorry to dig up this old post but it seems the right place to post. Tell me if it’s better to create a new post.
So here’s my problem :
I plugged the MB7363 Sonar sensor from Maxbotix to the Seeeduino Stalker v3.1 . I used the analog pin of the sonar (pin 3) and I connected it to the analog A1 input of the Seeeduino Stalker, Vpin to the 3,3v and GndPin to the GND pin, as you can see in the following picture :
I also added a 4LED display to show the value of the sonar from the analog input, again, as shown on the picture.
Everything work fine this way, but when I want to remove the LED display, the value of the analog input coming from the sonar drops to 0. If I reconnect the LED display, correct value from the sonar start being read again. Thing is that I use the LED display as debug and I need to remove it at the end to put this setting (Seeeduino Stalker connected to a battery) in a closed box. Leaving the LED display will use too much power.
So, is there anyone here that have any idea about what is going on here and how can I make it work without the LED display ?
Why is my readings on 0 when I have only my Maxbotix Sonar connected ? I tested the same code with the same setup on Arduino Mega and it works fine (with or without the 4LED display)..
Here’s the code I used :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
// include 4LED library ///////////// #include <TM1637Display.h> // Variables 4LED ////////////////////////////////////////////// const int CLK = 3; //Set the CLK pin connection to the display const int DIO = 9; //Set the DIO pin connection to the display TM1637Display display(CLK, DIO); //set up the 4-Digit Display. //////////////////////////////////////////////////////////////// //Set the Maxbotix pin to receive the signal. const int anPin = 1; long pulse; void setup() { /// 4LED Setup ////////////////////////////////////////////////////// display.setBrightness(0x0a); //set the diplay to maximum brightness //Open up a serial connection Serial.begin(9600); } //Main loop where the action takes place void loop() { pulse = analogRead(anPin); Serial.print("The value is: "); Serial.print(pulse); display.showNumberDec(pulse); Serial.println(); delay(500); ////////////////////////////////////////////////////////////////////// } |