Show Posts
Pages: 1 [2] 3 4 ... 14
16  Using Arduino / Programming Questions / Trouble with i2c on: March 07, 2014, 01:21:43 pm
I have a Raspberry pi connected to an Arduino over i2c. I am attempting to pass a string to the pi.
My code:
 * ReadSHT1xValues
 * Read temperature and humidity values from an SHT1x-series (SHT10,
 * SHT11, SHT15) sensor.
 * Copyright 2009 Jonathan Oxer <>

#include <SHT1x.h>
#include <Wire.h>
#include <UTFT.h>\

// Specify data and clock connections and instantiate SHT1x object
#define dataPin  15
#define clockPin 14
#define SLAVE_ADDRESS 0x04
extern uint8_t BigFont[];
char tStr[7];
char hStr[4];

UTFT    myGLCD(ITDB32S,38,39,40,41);
SHT1x   sht1x(dataPin, clockPin);

void setup()
    Serial.begin(38400); // Open serial connection to report values to host
    Serial.println("Starting up");
    myGLCD.setBackColor(0, 0, 255);
    Wire.begin(0x04); // join i2c bus

void loop()
  float temp_c;
  float temp_f;
  float humidity;
  // Read values from the sensor
  temp_c = sht1x.readTemperatureC();
  temp_f = sht1x.readTemperatureF();
  humidity = sht1x.readHumidity();

dtostrf(temp_f, 1, 1, tStr);
dtostrf(humidity, 1, 0, hStr);
Serial.print(' ');
myGLCD.print("Temperature: ",LEFT,0);
myGLCD.print("Humidity: ",LEFT,15);

// callback for received data
void receiveData()
    char c =;

void writeData (char data)
  Wire.beginTransmission(04); // transmit to device #04
                              // device address is specified in datasheet
  Wire.write(data);             // sends value byte 
  Wire.endTransmission();     // stop transmitting


// callback for received data
void readData ()
    int number;
number =;
         switch (number)
              case 1:
              case  2:
The error I am getting is:

readTemp_ino1.ino: In function 'void readData()':
readTemp_ino1:94: error: invalid conversion from 'char*' to 'char'
readTemp_ino1:94: error: initializing argument 1 of 'void writeData(char)'
readTemp_ino1:97: error: invalid conversion from 'char*' to 'char'
readTemp_ino1:97: error: initializing argument 1 of 'void writeData(char)'

What am I doing wrong?

17  Community / Bar Sport / Re: Rain on: March 03, 2014, 09:56:20 pm
Doubt if they were sustained, just gust, but sustained winds were probably in the 60-80 range. at our house they were 40-60, gusting to 80+, blew the roof right off my observatory!

18  Community / Bar Sport / Re: Rain on: February 28, 2014, 08:38:52 pm
The problem here is wind, the snow we put up with. We have had 2 weeks of high wind. 60-80 mph at home, but the road down to Denver has been closed 10 times with wind of 110 mph.

19  Using Arduino / Installation & Troubleshooting / Re: Raspberry Pi doesn't see Mega on: February 27, 2014, 01:26:01 pm
Sorry if I sounded irritating, I was confused by the I2C and serial monitor , dumb me smiley

No problem, I just saw that I needed to reduce things.

Are you plugging the Arduino directly to the USB Port in RPi, if yes then try using a powered USB hub(it may happen that the RPi cannot provide sufficient power to the Arduino through USB).

I am connected to the rpi through a powered USB 3.0/2.0 hub.

If it didn't worked try booting RPi with Arduino connected.

Good suggestion, but no joy, the Tools>Serial Port menu item is still grayed out
If that too didn't work,sorry I don't have anymore ideas. I don't have Arduino and ,I only have a Arduino on beadboard with CP2102 for USB TTL conversion and it seems RPi detects it and I am perfectly ok with using arduino with RPi.(Since RPi uses a linux distribution it must detect FTDI/atmega too , I don't know).

I am now connecting a 20x4 lcd via the i2c bus to use as a serial monitor. I move the arduino over to the PC for programming and downloading. Still, a lot of hassle becuase of missing serial port! Where are the gurus?
20  Using Arduino / Installation & Troubleshooting / Re: Raspberry Pi doesn't see Mega on: February 26, 2014, 04:35:26 pm
The USB  input on the Arduino is connected to a USB port on the pI through a powered USB Hub.
I have found that using this method the Arduino can appear at one of two com port addresses at random.
In python I cope with this as so:-
import serial
   ser = serial.Serial('/dev/ttyACM0',115200, timeout=2)
except :
   ser = serial.Serial('/dev/ttyACM1',115200, timeout=2)   

I don't understand why everyone is so fixated on what I doing. Think of it this way, i loaded the Arduino software, plugged in the Mega, and there is no listings in "Tools>Serial Port". so I cannot even download code, much less use the serial monitor to monitor  what the Arduino is doing! The i2c is working fine, the blacklist is correct! I can blink the port 13 led from the pi just fine!

21  Using Arduino / Installation & Troubleshooting / Re: Raspberry Pi doesn't see Mega on: February 24, 2014, 08:58:46 pm
You are lacking very much on detail.
How are you connecting the two together.
What is connected to the Mega to view the serial monitor on?
The USB  input on the Arduino is connected to a USB port on the pI through a powered USB Hub.
A VGA monitor is connected to the Pi through a VGA/HDMI adapter and I want to use the Serial monster provided by the Arduino program on the Pi, at least that is what I hope to do. In the meanwhile I am using Arduino on a PC not in sight and going back and forth on my wheelchaiir. What a hassle that is! I have successfully connected the Pi to the Arduino via I2C and am attempting to control hardware on the Arduino with the Pi and need to see what the Arduino is doing.

22  Using Arduino / Installation & Troubleshooting / Re: Raspberry Pi doesn't see Mega on: February 24, 2014, 01:49:33 pm
Do you have Arduino IDE installed on RPi?

Yes I do.
I'm trying to use the serial monitor through Arduino.

23  Using Arduino / Installation & Troubleshooting / Raspberry Pi doesn't see Mega on: February 23, 2014, 03:01:54 pm
I am trying to connect a Mega to my rpi to use the serial monitor to troubleshoot the code. I program it on my PC, which works fine. Unfortunately the PC is 10 feet away from where the pi and arduino are, so I can.t use it.A Uno didn't show either. I program it on the PC because the rpi is too slow.

24  Community / Bar Sport / Re: Found today on the intertez on: February 08, 2014, 08:34:25 pm
There was a early 60s VW running around sillycon valley in the 80s with license Feature.
25  Community / Bar Sport / Problen with ds102 oscilloscope on: February 04, 2014, 08:44:00 pm
I just purchased a new computer(Windows7 pro, 64bit). My ds102 oscilloscope worked fine with the old computer(Windows XP, 32bit) but the new computer gives error "USB device not recognized". I searched the web with no luck. This is really a handy device and I'd like to upgrade it!
26  Using Arduino / Programming Questions / Modifying Arduino libraries to use on Beaglebone Black on: November 06, 2013, 07:56:03 pm
I want to use a BBB thru level shifters to interface with a 3.2 touchscreen/LCD. The easy way would probably to modify the existing Arduino library , I think. Is this feasibly or as easy as I think?  Is there information on how to do this I havent found?

27  Using Arduino / Programming Questions / Firmata and LCD on: June 23, 2013, 10:48:56 am
I am relatively new to both Arduino and Raspberry Pi. I have Firmata working and can read a switch to control a LCD with the rpi. I found several examples to do this on the Internet but nothing more complicated. I have an Arduino Mega and a LCD/Touchscreen/shield from Sainsmart. I want to control the Mega to display on the LCD and read touch positions from the touchscreen through the Mega and pass them to the rpi. Are there examples on the net for more complicated uses of Firmata with a different shields which require thier own library? Does the library get added into to the Firmata sketch?

28  Community / Bar Sport / Re: What if the transistor was never developed? on: June 13, 2013, 07:43:59 pm
Speaking of valves(tubes) in 1970 I was working at Tetadyne Semiconductor. We made fetrons, which mimicked the characteristics of different tubes with FETs. The government requested a 12AX7 fetron. We made some samples and they took them away and came back and complained they didn't work. We must have gone through this cycle 6 or 7 times. Finally we told the government we needed to test the circuit and see what they needed. Two of us got Top Secret clearances so we could go see what it was. There was a one block square 7 story building is Seattle Washington housing the Dew Line computer. I'm not sure how many 12AX7's, but lots of them. When we finally got one that worked and sold them all they wanted, we heard that they turned off seven of the eight air conditioners on the building
29  Using Arduino / Installation & Troubleshooting / Re: Can't download with 1.X, can with 023 on: June 13, 2013, 10:24:12 am
Update! I had another Mega and tried it with same result.
30  Using Arduino / Installation & Troubleshooting / Can't download with 1.X, can with 023 on: June 12, 2013, 06:01:21 pm
I've using 1.0.1, mainly because I'm too busy to upgrade. I was doing the typical edit/compile,download/run/repeat sequence. I try to only edit 10/20 lines at a time because I'm a error prone programmer. One time I hit the download and my sketch compiled but did not download. I checked and the led on my mega flashes once, then every five seconds. Since there was an example for part of the board I was working on that used .02X I tried using that to see if it would download. It downloaded just fine. I then installed 1.0.4 and tried with that. No download! Because I'm a persistent cuss, I tried 1.0.2/1.0.3. Neither of those would either. .022 worked fine. WTF! The board is a Sainsmart 3.2" LCD/Touchscreen and my sketch worked, but needed fine tuning. Mega is a Mega 2560. No other shields connected. Program is based on UTFT/UTouch, and the examples provided for 1X do not download either.

Pages: 1 [2] 3 4 ... 14