Me Temp. sensor


#1

I’m using temp. sensor into RJ25 v.2.2 into Me Uno Shield on top of an Arduino Uno 3. Well, it works fine with mBlock. I can get pretty accurate readings, until I load over to the board and run off a battery instead of the computer. Seems to load fine to the arduino, but it reads 20 degrees lower. And I"m converting the c to f.

Here is the code coming out of mBlock:

#include <Arduino.h>
#include <Wire.h>
#include <Servo.h>
#include <SoftwareSerial.h>

#include <MeShield.h>
double angle_rad = PI/180.0;
double angle_deg = 180.0/PI;
MeTemperature temperature_7_1(7,1);
Me7SegmentDisplay seg7_8(8);

void setup(){
}
void loop(){
seg7_8.display(((temperature_7_1.temperature()) * ((9) / (5))) + (32));
}


#2

Figured it out.

seg7_8.diplay ((temperature_7_1.temperature( ) * 9/5 ) +32);

works now. I uploaded to ardunio ide to edit the code.

I wish I could edit the code in mBlock before sending to the board.
It’s not hard to use the arduino ide, as long as it can connect to my Me Uno Shield.
It only works when I’m opening it through mBlock.

Fun stuff!!


#3