Show Posts
Pages: 1 ... 10 11 [12] 13 14 ... 152
166  Using Arduino / Project Guidance / Re: Powering and Uno on: July 11, 2014, 11:33:24 am
Probably, but you know best by testing it. LCDs consume so little power that they can't put much demand on the cables., and any button connection should be quite tolerant about losing a volt. DS18B20s are available with 5m of cable.
167  Using Arduino / Project Guidance / Re: Logging data via Gobetwino - not a well formed command string error on: July 11, 2014, 10:28:49 am
Its RealTerm
It, and many others, can log and timestamp data into a csv file ready for transfer to Excel and all are freebies..

Gobetwino may have some value in other arenas but it's not pleasant and I wouldn't dare ask what on earth motivated your lecturer to suggest it for this purpose. If Excel is your intention and he knew what he was doing, he surely would have suggested PLX-DAQ or the like.  PLX is a free macro for Excel which effectively makes it a terminal, thereby allowing you to send data from Arduino direct into Excel. This enables you to draw real-time (yes, that's the word) graphs, something RealTerm cannot do.

This note might be useful

168  Using Arduino / Project Guidance / Re: Control BT Arduino-Android dont work with usb conect on: July 11, 2014, 09:37:23 am
It might not work correctly for very long.  It may be that you don't need to run it very long but, if you do, note that the top limit of the batteries is about 6v and that is the bottom practical limit for Arduino. Therefore 5x1.5 is probably a better bet.
169  Using Arduino / Project Guidance / Re: Powering and Uno on: July 11, 2014, 09:29:11 am
While 12v is a practical limit, the Uno is good for 20v. The 7805 has been around a long time and there are probably better ways to do the job.  There should be plenty of good 5v switchmode power supplies around but the project does not appear to include any real power hogs, and running it off a 1A USB  car adapter should suffice.

No comment on the 1602, except that a Nokia 5110 is probably a better bet. You get at least 72 characters, and the backlight is more or less redundant.

170  Using Arduino / Project Guidance / Re: Logging data via Gobetwino - not a well formed command string error on: July 11, 2014, 09:01:44 am
I am trying to log data as a text file from two thermometer readings using Gobetwino.

If that's all you want to do, it is surely easier to use an ordinary terminal programme, like RealTerm.       
171  Using Arduino / Project Guidance / Re: Control BT Arduino-Android dont work with usb conect on: July 11, 2014, 08:26:04 am
when I have the arduino connected to the PC via USB works perfectly, but when I have it connected to a battery ...

It depends on the battery, but it could be a power problem.
172  Using Arduino / Displays / Re: Sending text from the Serial Monitor to an LCD dispalyer on: July 11, 2014, 08:11:05 am
t you need to tell me how to wire the LCD and Arduino

Check the Hello World example in the IDE
173  Using Arduino / Networking, Protocols, and Devices / Re: Programming Tx and Rx pins on HC06 on: July 11, 2014, 02:54:38 am
Actually, I don't think you can do this with an HC-06 because of the restricted number of AT commands available to it, but I believe you can with an HC-05, and the command is on the data sheet.
174  Using Arduino / Displays / Re: How do I display serial data to nokia 5110 lcd? on: July 10, 2014, 06:39:07 pm
This is an old thread, there is nothing worth sharing, nothing to learn, and just about every line in the code is utter junk, so no wheel either.

I'm not sure what you expected to learn. If it is about thermistors, I don't use them but there is plenty of better information to be had around here. If it is about using the 5110, this is a good place to start.

I have not used it myself but I suspect that Henning Karlsen is an even better source.

The 5110 is a great little display, probably the best value around!

175  Topics / Home Automation and Networked Objects / Re: DS18B20 on: July 10, 2014, 05:34:08 pm
I don't think there is an error in my code. It compiles properly and it is working right now before my eyes.

I don't know what your problem is, but there are two things you need to do.

The first is to learn how to post code. A picture is not really going to help much. Use the hash icon and insert it between the pair. "Please Read..." instructions  abound at the top of every forum section.

The second is that you have not inserted the addresses of your sensors into the code. I don't think that is the cause of your problem but it will certainly stop you getting a result when you fix it.

I now think it is likely that your problem has occurred because you have not properly installed theDallasTemperature library. "Properly installing"  includes restarting the IDE after installation, even if you have put it in the right place.  In short, you may find you get a result now by the simple expedient of restarting the IDE, i.e. the code is 110% kosher, but the IDE didn't know what the hell you are talking about.

You will notice that the IDE takes for ever to start. I believe this is because it does a great swag of chores first, including a browse through the libraries.
176  Using Arduino / Project Guidance / Re: aquarium project on: July 10, 2014, 09:43:58 am
First up, the ino is for a 320x240 display. I would have thought a 7" screen would have higher resolution than that, therefore I believe you are using the wrong example.

Secondly, I recall some note about 7" displays on the Henning Karlsen website. You might have a look there.
177  Using Arduino / Displays / Re: Sending text from the Serial Monitor to an LCD dispalyer on: July 10, 2014, 08:40:36 am
I assume you really want to send the temperature from the sensor to the LCD.
I don't know why you would call a float for tempC. Probably a mistake.

float tempC;
int tempPin=0;
#include <LiquidCrystal.h>
// initialize the library with the numbers of YOUR interface pins
LiquidCrystal lcd(8,9,4,5,6,7);

void setup()
  lcd.begin(16, 2);

void loop()
  lcd.setCursor(0, 1);
178  Using Arduino / Project Guidance / Re: Arduino Uno with Android on: July 09, 2014, 09:52:16 pm

Nick - I'll get back to you to find out the cause of the super quick lighting. I suspect right now that they made it that quick because the high speed camera could take pictures at that rate so they wanted to make it as quick as possible so they can image as many samples as possible.

OK, on the strength of that and, as I warned, it could be that the "they" are either stupid, or they think you are. You can test this and/or get your own back by blinding them with science. Just ask whether by "high speed" they mean exposure, frame rate, or both and just what the numbers are.  If they can't answer, they are stupid. If they can, they will know you are just as smart as they are, which is a good way to get some better and more forthcoming dialogue.

I have no idea how you control the exposure on an Android camera to take photos. I thought you just pointed it and pushed the button. However, the Android is capable of taking movies. I have no idea what the frame rate is, but somebody surely does.. Furthermore, you might find the frame rate is adjustable under certain circumstances. I doubt this can be set by the user but it may be controllable if the user can set the circumstances. You will be amazed how slow the exposure can sometimes be, but a movie camera is a high speed still camera, and electronic ones can easily deliver 60 frames a second. The slow frame exposure may be immaterial anyway.

You may find that all you need do is synchronise the Arduino with Android's movie. It is likely to be all you can do, but don't ask me how.  

It occurred to my while riding over the Narrabeen bridge this afternoon that the synchronising might be quite easy if live adjustment is done with Android controlling Arduino as you should be able to see what's going on on the screen - visual feedback.

179  Topics / Science and Measurement / Re: Two channel interrupt driven datalogger - Need to reduce code size on: July 09, 2014, 09:11:26 pm
OK, in that event you might find that, since most of the size of a Mega is taken up by pins and tracks that are of no interest, building up a custom Mega equivalent from scratch might fix the problem, and you develop the job on  a plain-vanilla Mega.

I note you have two time-related libraries. That is not necessarily a problem in itself but I can't see why you are doing that. I'm not familiar with the DS3232 but I understand all the DSxxxx clocks are coded the same way. I have found that the most code-efficient way to get the time is here

This approach uses no libraries and no strings either

I use libraries for stuff like datestamping the SD, but am still in front by using the above to get the time. I found this while vainly struggling to use the Uno as a datalogger. No promises of salvation, but it might help. 

IF the real job of your display is this:

    TFTscreen.text("Time:", 0, 0); // write the text to the top left corner
    TFTscreen.text("Date:", 0, 20);
    TFTscreen.text("Temp:", 0, 40);
    TFTscreen.text("Humid:", 0, 60);
    TFTscreen.text("Count1:", 0, 80);
    TFTscreen.text("Count2:", 0, 100);

I submit the LCD you are using is a bad choice. It is grossly underutilised, a waste of money, and probably a waste of space as well. If you want the fancy stuff, you pay a high price for it in memory, and speed as well for that matter.  If you can do without it, a Nokia 5110 will deliver the above data with about 90% less code, and cost you $5.

The pictures below show a 5110 and a TFT. They are interchangeable, and the fundamental information they display is the same but don't even think about putting a UNO under the TFT, even if it did fit physically.   

I have already commented on that string stuff. In short, any code with the letters str in it should be deemed unwarranted, and the kiss of death. There is also a lot of stuff involving const ints, unsigned longs, bytes, and god only knows what all else that suggests that your code  is either very efficient or verbose junk, but it will take a better man than me to check. It needs checking nonetheless.

This code is just a simple clock with Nokia 5110. It shows the efficiency of both.

#include <PCD8544.h>
#include "Wire.h"
#define DS1307_ADDRESS 0x68
static PCD8544 lcd;

void setup(){
  lcd.begin(84, 48);
  // Print a message to the LCD.
  lcd.print("Today it is");

void loop(){


byte bcdToDec(byte val)  {
// Convert binary coded decimal to normal decimal numbers
  return ( (val/16*10) + (val%16) );

void printDate(){

  // Reset the register pointer

  byte zero = 0x00;

  Wire.requestFrom(DS1307_ADDRESS, 7);

  int second = bcdToDec(;
  int minute = bcdToDec(;
  int hour = bcdToDec( & 0b111111); //24 hour time
  int weekDay = bcdToDec(; //0-6 -> sunday - Saturday
  int monthDay = bcdToDec(;
  int month = bcdToDec(;
  int year = bcdToDec(;

    switch (weekDay)               // Friendly printout the weekday
    case 1:
      lcd.print("MONDAY  ");
      Serial.print("MON  ");
    case 2:
      lcd.print("TUESDAY  ");
      Serial.print("TUE  ");
    case 3:
      lcd.print("WEDNESDAY  ");
      Serial.print("WED  ");
    case 4:
      lcd.print("THURSDAY  ");
      Serial.print("THU  ");
    case 5:
      lcd.print("FRIDAY  ");
      Serial.print("FRI  ");
    case 6:
      lcd.print("SATURDAY  ");
      Serial.print("SAT  ");
    case 7:
      lcd.print("SUNDAY  ");
       Serial.print("SUN  ");

  Serial.print(" ");
   if( second==0)
   lcd.print("         ");

180  Using Arduino / Displays / Re: How do you properly convert values into String so as to display on the TFT LCD? on: July 09, 2014, 09:15:56 am
And, further to that, state the objective, post the code, and describe the LCD.
I don't think you should have to suffer from anything to do with strings of any sort and, if you insist on doing so, you deserve all the grief you get. You should be able to print in the simple manner I described above. The only time I have ever had to use  the dtostrf() function is when I was feeding data to alien software on  an alien device.
I don't think it's likely, but if your LCD library really demands that you take this route, looking for an alternative library written by somebody more competent  would be a good idea.
Pages: 1 ... 10 11 [12] 13 14 ... 152