Cooking Hacks Forum

Temperature sensor giving garbage in Serial port
Page 1 of 1

Author:  ncraghunc [ Sun Sep 16, 2018 9:56 pm ]
Post subject:  Temperature sensor giving garbage in Serial port

Hello team,
The following ccode is creating garbage on serial port .. Provide correct code or let me know whats wrong with it?


    Copyright (C) 2016 Libelium Comunicaciones Distribuidas S.L.

    By using it you accept the MySignals Terms and Conditions.
    You can find them at:

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <>.

    Version:           0.1
    Design:            David Gascon
    Implementation:    Luis Martin / Victor Boria

#include <MySignals.h>

#include "Wire.h"
#include "SPI.h"

void setup()

void loop()
  float temperature = MySignals.getTemperature();

  Serial.print(F("Temperature (*C): "));       
  Serial.println(temperature, 2); 

  delay(1000);  // wait for a second

the image is shown below. Kindly help with the correct code.
Also, I need another code for showing the temperature values in TFT (not the graph)

[img] </img>

Author:  libelium-dev [ Mon Sep 17, 2018 8:23 am ]
Post subject:  Re: Temperature sensor giving garbage in Serial port


You should select the correct baudrate in the serial monitor windows. You should select 115200 in the foldable of the window in the right down corner.

Please for more information about MySignals please check the tutorial, ... ial/#step5


Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group