Show Posts
Pages: 1 2 [3] 4
31  Using Arduino / Programming Questions / Re: Why do newly uploaded sketches not execute until the serial monitor is opened? on: February 06, 2013, 01:58:00 am
My problem isn't exactly the same. The sketch executes no problem but when I open the serial monitor it restarts the arduino. Sorry dude.

That's normal, from what I read, under Mac OS and Linux.
32  Using Arduino / Programming Questions / Re: Why do newly uploaded sketches not execute until the serial monitor is opened? on: February 06, 2013, 01:57:02 am

Well I found a fix, but I have no idea why it works.

I have some hardware connected via a shield.  A temperature measuring IC, an LCD panel, and a RTC. The culprit was a DS18B20 onwire temperature device.  I had it connected to digital pin 4, and it was working when I loaded my sketch that read it's value and displayed it on an LCD panel (that is connected to the IIC bus (along with a DS1307 RTC) using analog pins 4 and 5).

I unplugged things one at a time, until I found that it was the DS18B20 that was causing the odd behaviour of the IDE.  I moved it to digital pin 8.   Now I can upload a sketch and have the Arduino restart normally again!!!!!  Even better, after changing the pin number for the onewire comms - the DS18B20 is working as normal on pin 8.

Keep in mind, the sketch upload problem was happening, even with a sketch that did not access the DS18B20, nor even the digital pin 4 that it was on, for any purpose whatsoever.  So what is different between pin 4 and 8 that could cause this strangeness?
33  Using Arduino / Programming Questions / Re: Why do newly uploaded sketches not execute until the serial monitor is opened? on: February 06, 2013, 01:20:49 am
Well if that program is causing your problem,  I got no idea.    There is nothing that the serial monitor does,  or doesn't do,  which would cause the problem you describe.

...and yet I am not the only one seeing it happen.
34  Using Arduino / Programming Questions / Re: Why do newly uploaded sketches not execute until the serial monitor is opened? on: February 06, 2013, 01:18:03 am
One answer might be,   that the sketch is "waiting" to either send data,  or receive data,
from the serial monitor.

I tried to ensure that is not happening, hence why I gave the example of blink program that comes with the IDE.  I see nothing in that sketch sending or receiving data.

Here it is to save you having to look for it.

Code:
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */
 
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;

// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  pinMode(led, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);               // wait for a second
  digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);               // wait for a second
}
35  Using Arduino / Programming Questions / Re: Why do newly uploaded sketches not execute until the serial monitor is opened? on: February 06, 2013, 12:47:46 am
Happens to me too with mega 2560. That's why I opt to use lcd instead for debugging. I'm impatient lol. I'm total noob too. I'll be watching to see what the good guys say. smiley

I have an LCD I can use too, but even without any code trying to write to the serial port (which is why I gave the example of the blink program - it doesn't use the serial port), it still seems to hang.  Maybe it's normal - and I never noticed it earlier.  Just thought I'd get the experts to set me straight smiley.
36  Using Arduino / Programming Questions / Why do newly uploaded sketches not execute until the serial monitor is opened? on: February 06, 2013, 12:36:58 am
I have only had my Uno a few days, but I am sure it wasn't like this at the start.  Now however, it seems, even the example blink program, won't start up until I open the IDE's serial monitor window after I upload the sketch.

If I reset the Uno, or power it up, without the IDE connected, then it works normally.  But if I upload a new sketch, the Uno just sits there, until I open the serial monitor - which resets the Uno, and then it starts executing the sketch.
37  Using Arduino / Installation & Troubleshooting / Re: IDE v1.01 - ctrl-Slash doesn't properly comment highlighted code on: February 05, 2013, 11:46:14 pm
I am not even able to press ctrl+/ in my keyboard. Pressing the menu item, do you experience the undo problem? or only with the key shortcut?

Using the menu, it works correctly.  Only using the shortcut keys does it wipe out the code with a second /.
38  Using Arduino / Installation & Troubleshooting / IDE v1.01 - ctrl-Slash doesn't properly comment highlighted code on: February 05, 2013, 08:42:07 pm
ctrl-Slash is shown as the shortcut on the edit menu, to comment out the highlighted code portion.However, when I use it, I end up with the code disappearing and replaced by a single '/'. 

Using ctrl-z to back out, first the '/' is removed, then using ctrl-z a second time, the code reappears and it is all commented out with preceding '//''s as was originally desired.  It looks as if the IDE is misinterpreting ctrl-/ as  ctrl-/ followed by / .
39  Using Arduino / Programming Questions / Re: Phi Prompt menu examples will not compile on: February 05, 2013, 07:36:08 pm
Post the locations where the uncompressed files are. They may be just in the wrong location.

I uncompressed them to the same place as all my other 3rd party libraries (the others work fine).  Because it's linux, they are under ~/sketchbook/libraries  ( ~ meaning home directory under linux)
40  Using Arduino / Programming Questions / [solved] Phi Prompt menu examples will not compile on: February 05, 2013, 07:16:10 pm
The solution found was to not the arduino IDE version 1.0.1? Use 1.0, 1.0.3 or 1.5 Thanks.
//=========================================================================


I downloaded the Phi Prompt library zip file from http://code.google.com/p/phi-prompt-user-interface-library/downloads/detail?name=libraries.zip&can=2&q=  and tried some of the examples.

Nothing will compile.  Firstly I got lot's of errors about prog_char which I fixed using this suggestion I found on the forum
Code:
2) change the data type from "prog_char" to "char PROGMEM" in print(const _FlashStringHelper*).

Now I am getting lot's of errors like

Code:
phi_prompt_example_menu_20X4_display_phi_panel.cpp:63:29: error: variable ‘msg_00’ must be
const in order to be put into read-only section by means of ‘__attribute__((progmem))’


First question - where is the file "phi_prompt_example_menu_20X4_display_phi_panel.cpp"?  Is that an intermediate file generated from the .ino file?

Second - are all these errors due to wrong versions of the IDE  (I am using 1.01 under linux).
41  Using Arduino / Project Guidance / Re: external 5V connection usage and the SEL jumper on a sensor shield on: February 05, 2013, 12:15:24 am
Took out the old multimeter, and tested things.      Removing the SEL jumper, removes internal power from the 14 digital GVS connections, but leaves power on the 6 analog inputs, as well as the serial and LCD connectors.  Didn't have the pinout handy for the specialty connectors for APC220 module, Bluetooth, SD card, and URF - but I expect they'll retain internal power too.
42  Using Arduino / Project Guidance / Re: external 5V connection usage and the SEL jumper on a sensor shield on: February 04, 2013, 10:36:55 pm
Quote
Is that used to isolate the power somehow?  (also a schematic would help me figure it out if one exists anywhere)

Could very well be. The best path to take is to use a digital multimeter in resistance or 'continuity' mode and measure between the all the Vcc pins on the male pins and either the shield 5V pin or the external 5vdc screw terminal, to see how the voltage source works with the jumper clip in one position or the other and with no jumper at all. The voltage source should come from either the 5V shield pin or the external 5 volt screw terminal source. That should give you a clear picture of how it works and if it works for what you want to do.

Lefty



Good idea, just try it with a multimeter - should have thought of that.

I read somewhere, earlier today, that some shields use it to change the power source for the digital interfaces, but not the analog inputs.  Probably because it's assumed the digital devices will be the ones needing more power (for relays etc).  I am betting I will find this one is similar.
43  Using Arduino / Programming Questions / Re: Advanced programming of LCD display on: February 04, 2013, 10:27:42 pm
Fancy some menus and data entries?

http://liudr.wordpress.com/phi_prompt/

This was designed for parallel LCD interface so you need to modify it to work with an I2C LCD.


That's good stuff.  Yes, I will need a menuing system.  Thanks for the link.
44  Using Arduino / Programming Questions / Re: Advanced programming of LCD display on: February 04, 2013, 10:25:24 pm
Yes, thanks, tried that custom character just now and it works.  Looks like most things in that library have been implemented.

But there's lots of other interesting stuff mentioned in the header file

Code:
// flags for function set
#define LCD_8BITMODE 0x10
#define LCD_4BITMODE 0x00
#define LCD_2LINE 0x08
#define LCD_1LINE 0x00
#define LCD_5x10DOTS 0x04
#define LCD_5x8DOTS 0x00

  void printLeft();
  void printRight();
 
  void shiftIncrement();
  void shiftDecrement();
  void command(uint8_t);

So, I am wondering about 8 bit mode vs 4 bit, 5x10 dots vs 5x8, printleft/printright, and especially that last "command" function.

There's also some unimplemented API functions

Code:
////Unsupported API functions (not implemented in this library)
uint8_t status();
void setContrast(uint8_t new_val);
uint8_t keypad();
void setDelay(int,int);
void on();
void off();
uint8_t init_bargraph(uint8_t graphtype);
void draw_horizontal_graph(uint8_t row, uint8_t column, uint8_t len,  uint8_t pixel_col_end);
void draw_vertical_graph(uint8_t row, uint8_t column, uint8_t len,  uint8_t pixel_col_end);

The bargraph, in particular, looks interesting.

45  Using Arduino / Programming Questions / Advanced programming of LCD display on: February 04, 2013, 08:13:37 pm
Having just bought my first Arduino (Uno) and a 20x4 I2C LCD display (from Sainsmart), I have been learning how to get it working.

I have managed to get the basics working fine, after sorting out the library version problem (I found a newer library for the v1 IDE) and the incorrect I2C address (0x3F, not 0x27), and so now have the typical "Hello World" example displaying nicely on my LCD screen.

I would like to move on to more advanced usage - like custom characters, scrolling messages, and whatever else the display is capable of, but can't seem to find much using Google.     Maybe someone could point me to some good examples/tutorials/documentation for the other functions implemented in the library, and by the display?
Pages: 1 2 [3] 4