Show Posts
Pages: 1 ... 51 52 [53] 54 55 ... 152
781  Development / Other Software Development / Re: Simulator for Arduino v0.98 on: January 11, 2014, 03:32:59 am
Does the 150 lines include empty or small lines ( maybe a single bracket ) or libraries?
782  Using Arduino / Project Guidance / Re: Arduino Error "error: 'class _Esplora' has no member named 'readTK' " on: January 11, 2014, 03:24:38 am
What is your code, I can only assume the code below, which has no problems compiling:

#include <Esplora.h>

void setup() {}

void loop() {}

There is no readTK in the Esplora library (1.5.2), you must have that symbol somewhere in your code. Have you also changed the board type to Esplora?
783  Community / Website and Forum / Re: Can anyone else verify this font size shrinking problem? on: January 09, 2014, 10:55:08 pm
Its not a bb tag causing the problem. His signature has been truncated leaving a half finished piece of HTML

Fixed, thanks for the hint.

No worries, happy to help out.
784  Using Arduino / Programming Questions / Re: format output for char * on: January 09, 2014, 07:59:14 pm
printf returns a count, not an array of chars.

look at sprintf to format to your own buffer ( char[] ) that you can then pass to the function.

No float support in AVR Arduinos though ( sprintf ), look at recent posts, this was discussed yesterday I think.
785  Using Arduino / Programming Questions / Re: initializer but incomplete type error on: January 09, 2014, 07:24:57 pm
Have you declared 'radio'

RF24 radio(9,10);
786  Using Arduino / Programming Questions / Re: Why cant' I break out of prison? on: January 09, 2014, 07:19:20 pm
does that even compile for you, you  seem to have output down the bottom, which is not from that code!
Function calls and code in file scope is not C++, what libraries do you use?

also, ~true does not return false.

while( !clockInterrupt ) {
787  Development / Other Software Development / Re: cannot display all examples IDE 1.0.5 on: January 07, 2014, 08:07:09 pm
Where ever your examples are, place some into an additional folder ( at their location ) so there isn't too many in the one folder.

Then restart the IDE, hopefully like mine, the additional folder becomes a sub menu in the IDE. This is fixed I think in the 1.5.x versions.
788  Using Arduino / Programming Questions / Re: Complex IF statements with boolean on: January 07, 2014, 07:57:21 pm
Simplify that block of syntactic pudding just so you can understand your own code.

You repeat the first checks, also writing it backwards save re checking the same thing over and over.

This is just an example, you can cram it all inline like yours if you like.
if( DHT.humidity >= 65 ){

}else if( DHT.humidity >= 60 ){  //The check above implies that the value is less than 65, therefore no need to check.

}else if( DHT.humidity >= 50 ){  //Ditto


If you are getting more than one alert, it is the code surrounding it that we need, there is clearly only one alert message here.
789  Development / Other Software Development / Re: where to post new library on: January 07, 2014, 07:22:33 am
You can post your library in this 'other software development' section, you are not restricted to it however, post where ever seems relevant to what your library does, just try not to cross-post unless each thread can contain section specific usage, rather than just repeating. You can also create an article for it in the playground:

Either way you still should post about it somewhere just so people know its there.
790  Using Arduino / Programming Questions / Re: Prime VFD not compiling HELP! on: January 06, 2014, 05:32:13 pm
Don't worry it will, there are more bugs, don't know how it was tested to compile. It clearly doesn't.

You will need to open PrimeVfd.cpp & PrimeVfdInterrupt.cpp and replace one include.

#include "WProgram.h"

#include "Arduino.h"

In both files.

After doing this:
Binary sketch size: 3,688 bytes (of a 32,256 byte maximum) - 11% used
791  Using Arduino / Programming Questions / Re: Prime VFD not compiling HELP! on: January 06, 2014, 05:23:37 pm
What version is your IDE, it appears they provide an updated version for you:

Quote Version updated for Arduino 1.0 and later. Tested to compile only, no other testing has been done. For Arduino versions prior to 1.0. Tested with samples on hardware.

And the new version has the correct prototype:
virtual size_t write(uint8_t character);
792  Using Arduino / Programming Questions / Re: structures and object oriented programming help on: January 06, 2014, 07:30:24 am
Not meaning to pinch the thread, but this seems inline and a bit more substantial compared to 'yes'.

Unions are objects just the same as classes and structs. To provide an insight as to where a member function may be useful in a union this example uses a conversion operator to provide an alternative to supporting the Printable base class. It will serialize anything using a union.

Then you can print or write it to anything supporting the print library.

template< typename T >
  union Serialize{
    T Obj;
    byte Data[ sizeof( T ) ];
    operator byte*(){ return this->Data; }
    operator char*(){ return ( char* ) this->Data; }
    size_t size() { return sizeof( T ); }

struct UnPrintable{
  int a, b, c, d, e, f, g;

void setup() {
  Serial.begin( 9600 );
  UnPrintable u = { 'ba', 'dc', 'fe', 'hg', 'ji', 'lk', '\0m'  };

  Serialize< UnPrintable > s = { u };
  Serial.println( s ); //Look it prints.
  //Or if there is no null at the end.
  Serial.write( s, s.size() );

void loop() {}

As unions allow initializing the first member, you can remove the duplicated memory and just use the union.
Serialize< UnPrintable > s = {{ 'ba', 'dc', 'fe', 'hg', 'ji', 'lk', '\0m'  }};
793  Using Arduino / Programming Questions / Re: structures and object oriented programming help on: January 06, 2014, 06:57:36 am
794  Using Arduino / Interfacing w/ Software on the Computer / Re: C++ Program communicating with Arduino Uno on: January 06, 2014, 03:23:16 am
Agreed, its far easier in C#, however it may be too late to transpose an entire app. Here is some info on how to do it on windows ( without C#, its method is far simpler ). This is for C++, however any language that can use the windows API has access to the same functions, and possibly easier ways.

I can't remember off hand their names, however there are some open source serial implementations which wrap this functionality into a nicer interface.

Here is an article that popped up first.

I haven't looked into the next link, it seemed interesting from the google caption  though.
795  Development / Other Software Development / Re: Sublime Text and Stino: Best IDE you can have. on: January 01, 2014, 05:49:53 am
Your last item is flagged as an unsafe page ( .
Both VirusTotal and Comodo flagged it.
Pages: 1 ... 51 52 [53] 54 55 ... 152