Show Posts
Pages: 1 ... 281 282 [283] 284 285 ... 411
4231  Using Arduino / Programming Questions / Re: Working with byte datatypes in version 1.0 of the IDE on: December 02, 2011, 10:35:58 pm
Code:
Serial.print( ( unsigned ) 0x00 );

You really need to read the changes in 1.0.  Serial.print() prints the ASCII value.  The original poster is trying to write the value 0.   That is now done with Serial.write().

http://arduino.cc/en/Serial/Print
http://arduino.cc/en/Serial/Write

Serial.print(0); works fine.

Anyway, casting like this works for Serial.write():
Serial.write((uint8_t)0);
4232  Using Arduino / Programming Questions / Re: Getting each decimal out of a number on: December 02, 2011, 10:21:23 pm
last one line in the main program before servicing the next interrupt. During this time it stores the interrupt flag in a register.
Maybe one line of assembly but not C-code.

If an interrupt fires every 30us that is slow enough to finish quite a bit of code between interrupts.  It is also much faster than your human eyes can see the LEDs update.
4233  Using Arduino / Programming Questions / Re: Working with byte datatypes in version 1.0 of the IDE on: December 02, 2011, 10:05:52 pm
It only seems to occur when the value is 0.  Which makes me wonder if the overload is whether it is an integer or a null character?

Serial.write(0,1); 

(val, len) seems to work
4234  Using Arduino / Installation & Troubleshooting / Re: I think deleting WProgram.h was a bad idea on: December 02, 2011, 05:17:54 pm
No matter how long you provide legacy support, eventually things will break.  1.0 is a clearcut place to make some difficult decisions. 

The developers have been very clear that WProgram.h was going away.  So in essence, the "break-in" period should already be over.  Nobody should have been surprised when 1.0 came out yesterday.  It has been known for months this change was coming.

Whether it changed yesterday or 5 years from now, someone would make the pointless case that "this was a bad time to change it."  Yes, anytime you make a change like that, it is a bad time.
4235  Using Arduino / Installation & Troubleshooting / Re: Arduino IDE Crash on Mac OSX when uploading on: December 02, 2011, 05:13:35 pm
It appears to be a Java issue.  You might double check Software Update and see if you can get a Java update.

BTW, the FTDI drivers have nothing to do with the Uno.  A Uno emulates a USBModem (in your case /dev/tty.usbmodem441) and appears in Network System Preferences.
4236  Using Arduino / Programming Questions / Re: Arduino TV-B-Gone code on: December 02, 2011, 11:58:19 am
1.  Click the word that says "download here" at: http://www.arcfn.com/2010/11/improved-arduino-tv-b-gone.html
2.  Unzip the file into a folder
3.  Double-click the TVB.pde to launch the Arduino IDE.
4.  Click Upload
4237  Using Arduino / Project Guidance / Re: Does this IC exist? on: December 02, 2011, 11:38:51 am
ICs are created and sold for use in applications.  Explain the application you are trying to solve instead of the parts.  That will help you find if the IC exists and help others suggest what you need.
4238  Using Arduino / Programming Questions / Re: I2C lcd on: December 01, 2011, 11:55:44 pm
Quote
So I am not sure what you mean rapped in code tags
You paste your code.  Then highlight it.  Click the '#' button in the post editor.  You'll see what "code tags" are.

---

I'm really not certain I understand what this new code you posted has to do with your original I2C question.  The new code you posted doesn't make use of the I2C library and all of the digital I/O pins are consumed so you can't use a parallel LCD.  I suspect you're making some kind of step forward (or backward) and leaving the details of that step out.

lcd.begin() should only be called once, which means it should only be in setup(), not in loop().

"Not in scope" is the complier's way of saying it doesn't know what a variable is.  In this case, you have not defined lcd anywhere in the sketch.  You should have created a global variable called lcd.  Global variables go outside of setup() and loop().  It needs to be global so you can call "lcd.begin()" in setup() and then use in loop().

From the "Hello World" example of the LiquidCrystal library:
Code:
// include the library code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);  // <-- this is the line that defines the object/variable "lcd"  the rest of the numbers are related to how the parallel LCD is wired.  **THIS IS HAS NOTHING TO DO WITH YOUR I2C DISPLAY.

void setup() {  // set up the LCD's number of rows and columns:
  lcd.begin(16, 2);
4239  Using Arduino / Programming Questions / Re: I2C lcd on: December 01, 2011, 10:05:09 pm

The small code I entered above still compiles and runs ok. I trying to add this to code which ran fine in the original LiquidCrystal library.
So far I have added the first three lines of the above code to it, and I am still getting the same errors,here are those errors.

It is good to post the error messages you are getting.  However, instead of providing a cryptic scavenger hunt, why not post the code (wrapped in code tags, provided by the '#' button in the post editor) that isn't working?  Personally, I can't follow your directions and duplicate the problem.  E.g, especially the vague part of "I have added..." what did you add?
4240  Using Arduino / Installation & Troubleshooting / Re: Arduino IDE Crash on Mac OSX when uploading on: December 01, 2011, 07:02:31 pm
What version of the Arduino IDE are you using?
4241  Using Arduino / Programming Questions / Re: I2C lcd on: December 01, 2011, 06:48:41 pm
Your screenshots are better than nothing, but realize you completely obscured the path.  There is enough there for me to see that you didn't listen to my original advice.

Unzip it and put it in your libraries folder.  If you don't have a libraries folder, where your other Arduino sketches are stored, create one.

Your Sketches are stored in the path:
(XP) C:\Documents and Settings\username\Arduino\
(7)  C:\Users\username\Documents\Arduino\

That's where you need to create a libraries folder for you to put YOUR downloaded libraries.

See my screen shots.
User owned libraries:  path where Arduino.exe stores your sketches

libraries contents and LiquidCrystal_I2C contents are the contents of the respective folders.

Contributed libraries in IDE shows how LiquidCrystal_I2C appears correct in the IDE.
4242  Using Arduino / General Electronics / Re: Most affordable power supply solution? on: December 01, 2011, 06:29:17 pm
Yes you should always measure with a proper load.  The definition of proper will vary.  For example, if you know your circuit will draw 1A, don't measure the supply with 100mA and vice versa. 
4243  Using Arduino / General Electronics / Re: Arduino > Movie player on: December 01, 2011, 10:21:52 am
Current limiting resistors are always a good idea, especially if you don't know what the other side of the circuit looks like.
4244  Using Arduino / General Electronics / Re: Voltage regulator on: December 01, 2011, 10:15:22 am
Generally regulators have a minimum load requirement before their output is stable.  You might try a load of a 10K resistor just to get some current flowing.  This combined with the relatively large capacitors you are using could be keeping the regulator from stabilizing its output.  (The datasheet only recommends 0.33uF on the input and 0.1uF on the output.)


Of course if your goal is 3.75V then zoomkat's suggestion is best of all.  Just go straight for an adjustable regulator.
4245  Using Arduino / General Electronics / Re: Most affordable power supply solution? on: November 30, 2011, 05:55:09 pm
I use these Apple-knock off adapters to get 5V into my enclosed projects.  $5 (with prime.)

http://www.amazon.com/Wall-Charger-Sync-Cable-iPhone/dp/B004911E9M/ref=sr_1_1?rps=1&ie=UTF8&qid=1322693629&sr=8-1

You can get them even less in bulk without prime or on eBay.

Quote
Second -- can you buy those circuit boards from within the wall warts bulk? Or some other kind of mains-to-5V power supply component already built? If I could get < $5 for this part, that would be a win for me!
I've never felt the need to put the circuit inside my boxes.  I'd rather run a small DC cable into the box than mains power, but that's just my preference.
Pages: 1 ... 281 282 [283] 284 285 ... 411