Show Posts
Pages: [1] 2 3 ... 196
1  Using Arduino / Programming Questions / Re: Motion detection on: September 21, 2014, 11:01:59 pm
If you'd have provided the compiler output data... Perhaps this might have solved or provided enough more data... That might just have solved your issues..

But your program isn't working.

does nothing for anyone to try to give you some constructive advice as to where you need to change something...
But I'm sure You've already read this
And obviously #6 cannot apply to you...
Mr Google is the best friend a programmer or wannabe programmer could ever have...
It appears that you've not had the good fortune to really meet him... Try it and make it a habit prior to posting here to use it...
You'll be amazed at what you can learn... when/If you are willing to learn.

2  Using Arduino / Microcontrollers / Re: Smaller substitute for Arduino uno on: September 20, 2014, 12:28:27 pm
My Teensy3.1's have no issues running any t85, Uno or any other Arduino code unless the code requires pins that aren't present on the teensy.
Most changes required either involve the 3.3 analog ports. (the digital ports are 5v tolerant) or adding port buffers to increase the drive current...
There are some other differences but those are more likely to deal with things like DMA functions or the two really neat and fast I2C ports that can operate @ 2+ MHz
Some time basic I wrote (borrowed) a tiny 85 sketch that makes a yellow led... flicker like a candle in a small breeze.
I changed the led pin to a PWM port and I have a  pretty little candle... with an ldr for daylight shutdowm sensing..
Having 256 k of flash, 64k of sram and 2k of Eeprom, full USB a 12 bit dac as well as using the large Arduino code base both .023 and 1.0+ versions is nice too.
That the board can be overclocked to 96 +  MHz from a 72 MHz default is nice also. The board will work to from 4, 8, 14, 24, 48 and 72 MHz where 96 MHz is a menu selectable over clock option... the board can go to 186 MHz with some small code changes, Too.
So the Teensy 3.1 @ $19.80 from PJRC or $17.00 from OSH Part is a nice fast and inexpensive board that is easy or better to use than  A 16 MHz Pro mini.
I don't recommend starting out with a teensy unless your basic  code skills are good however it's a good bridge between a Mega 2560 and  a Due.. and at the price, adding the cost of an Arduino compatible Uno style shield board... places It just below the cost of a Mega R3. and some of  the add-on boards support the use of the nRF24XX. Two 8 pin connectors, one for HW support and the other for bitbanged SPI... available from Tindie
It's a combination That's hard to beat...
One more thing is that there is a good forum for support of your your issues...   Too.

3  Development / Other Software Development / Re: Some new core functions on: September 19, 2014, 10:18:21 pm
@ westfw.
Thank You for posting a most relevant explanation of why less is more...
4  Using Arduino / General Electronics / Re: Soldering problem on: September 16, 2014, 03:36:23 am
"Ink" erasers work best.... with some care they are also good for cleaning certain types of connectors.

5  Using Arduino / General Electronics / Re: 3.3V simple vs zener on: September 16, 2014, 03:29:05 am
An MCP1702 would be a better choice.. Data sheet attached..

6  Using Arduino / Programming Questions / Re: Calculate Period Between Pulse on: September 15, 2014, 09:57:56 pm
This is I believe why you are seeing garbage, Albeit consistent garbage...
... One too many zero's..

7  Using Arduino / Programming Questions / Re: Calculate Period Between Pulse on: September 15, 2014, 07:23:00 pm
I would suggest a copy paste error. As was pointed out:
This lines:
      (do period=(lastpulse-firstpulse)/RPMpulses)
      output period)


      (output zero)

Are not "Arduino language" so he don't understand they.
Makes no sense whatsoever.
There are one or more syntax errors on each and every line
Hint: the semicolon is used to end a line and your parentheses don't match... Each' (' requires a matching ')' .
You might explore your IDE a little more... You could get lucky and find both Ctrl T and the verify button
Ctrl T would have pointed out all of your errors that verify didn't...

8  Using Arduino / Programming Questions / Re: question on the 128X64 i2c OLED LCD LED blue/yellow Display. on: September 15, 2014, 07:00:03 pm
Two things... Did you put the library in the right place? and did you restart the IDE After you put the library in the right place?
failure to do both would generate the error you reported.

9  Using Arduino / Programming Questions / Re: NEWBIE: Building code to monitor in the background. on: September 15, 2014, 12:26:57 pm
Proper use of this forum section requires the use of code tags and the method is here:
Your question just might be answered a great deal faster if it wasn't so hard to read 5 screens of code instead of one scrollable window...

10  Using Arduino / Programming Questions / Re: question about 2 different water tank code! on: September 14, 2014, 06:24:32 am
I didn't consider anything but a means of measuring both tank volumes, Obviously connecting both was a simple answer to an unstated condition..
However with a little imagination and some very little (simple) mathematical knowledge it could be written as a simple function that can be called with each data set.. The rest is up to your skills at C/C++ and your ability to use google and a simple calculator to prove your math.
Particularly since one variable per tank can change...

11  Using Arduino / Programming Questions / Re: Repetition of pseudorandom Random() sequence on: September 14, 2014, 06:11:59 am
@ Nick and Coding Badly?
  Very entertaing from both aspects ..
Dilbert was great... However Nick's 99 coins was also great (er)
Nick + 1
CB.. +  1
Very provocative Both.

 I thank you both for a real Jewel...
12  Using Arduino / Programming Questions / Re: Interrupts in Adafruit_GPS library example on: September 14, 2014, 05:40:13 am
GPS sentences occur every second... Endlessly... Here is the comment about that code... or at least the ISR code
// the nice thing about this code is you can have a timer0 interrupt go off
  // every 1 millisecond, and read data from the GPS for you. that makes the
  // loop code a heck of a lot easier!
It does but it is most unfriendly with other code ... like writing to an LCD display...
Try Mikal Harts TinyGPS++ Found here:
It's a whole lot easier than the Adafruit example sketch.

13  Using Arduino / Programming Questions / Re: question about 2 different water tank code! on: September 14, 2014, 05:28:19 am
Your answer is dependent on the geometry of the two tanks which determines the level of equal amount of water.
A simple ratio can be used for comparing the water levels..
OR if one tank can be above the other, the total level level or volume is related to the pressure at the final tank outlet..
Or here is a simple Google search that will return the volume in gallons, Took me 5 seconds, I guess you don't have google?
Hi Dean,

I'll do cylinder A and that should show you how to do the calculations for B. I am going to assume that you mean American gallons. One American gallon is 231 cubic inches.

The volume of a cylinder is given by

volume =   radius2  height

Your cylinder A has a radius of 4' = 48" so, since  is approximately 3.1416, one foot (12 inches) height of this cylinder has a volume of

  radius^2  height = 3.1416  482  12 = 86859 cubic inches.  // use your tank numbers here and do it for both tanks
A simple set of calculations with a slight re arrangement of the formula above will give you an answer that can easily scaled to any measurement type that you desire

Since 231 cubic inches is one gallon this is

 86859/231 = 376 gallons.

Since your cylinder is 12 feet high its volume is

12 multiply 376 = 4512 gallons.

Stolen from

14  Using Arduino / Programming Questions / Re: Receiving erratic values for potentiometer - WITHOUT touching it/moving it on: September 14, 2014, 05:17:33 am
@ BulldogLowell... The 7805 is less than an optimal solution as it has a 2.5 V overhead or dropout voltage thus requiring nearly 8V for proper operation which will not enable use of all the capacity of the battery as it will fail when the Vin  drops to 7.5V (Ideally) to the regulator and since most 9V batteries will drop to 8 to 8.4 V rather quickly... I also use a 470 to 1000 uF capacitor across the battery because the internal resistance of a battery must increase as the battery loses capacity due to use...
It can be as  much as 30 - 40% with light loads, Worse by far as the load current increases due to the increasing losses due to the changes in the battery
The solution mandates a low dropout voltage linear regulator, ie one with less than ~ .8 V dropout voltage @ full load current, otherwise your reasoning is spot on.
For my style of engineering (Murphy was an Optimist) using a 9V battery on an LM7805 leaves no useful margin...
Whenever possible I use a cellphone charger to the 5V output on the PCB, else a 7.5V wallwart to the Vin or DC in..
I really like the mains operated cell phone chargers as they are nearly free... most all fail due to the device connector wear But I've Never had one fail and put out more than the rated voltage...
Simply because they are free or nearly so... Typically $0.75 at any thrift store in Southern California...

15  Using Arduino / Programming Questions / Re: Receiving erratic values for potentiometer - WITHOUT touching it/moving it on: September 14, 2014, 12:05:10 am
onlythis one is likely to sovle your issues..
For My development work I use a 7.5V 2A power supply plugged into the DC in connector, Mainly because after the protection diode and the linear regulator losses it provides ~ 7V to the regulator which has an ~ .6V dropout voltage which is more than enough to keep the 5V dc supply in regulation (7.2V DC at the regulator input and since only 1 V is the maximum required difference between the source and the load voltage X the load current keeps the loss heating of the AMS1117-5.0 to a minimum .1A X 1.?1 V = ~.1 W or 100 mW energy lost as heat.. IHTH...

Pages: [1] 2 3 ... 196