Show Posts
Pages: [1] 2 3 ... 974
1  Using Arduino / Programming Questions / Re: Issues with strstr_P (PROGMEM) on: Today at 02:51:18 pm
Can you explain me why is the "static" keyword important here ?

Without it the foos exist on the stack.

Quote
Actually, I thought that all PROGMEM var (in FLASH) were static, since the FLASH isn't written during the execution of the program

We are discussing a C++ program which means C++ rules still apply.  Without the static they are automatic variables which puts them on the stack.
2  Using Arduino / Programming Questions / Re: Issues with strstr_P (PROGMEM) on: Today at 01:00:31 pm
Quote
static const char *foo PROGMEM = "is";

...stores the pointer to the string in Flash.  The string is stored in SRAM.

Quote
static const char foo[] PROGMEM = "is";

...stores the string in Flash.  The pointer only exists in the compiler's head.

See the difference?
3  Using Arduino / Programming Questions / Re: MersenneTwister.h Troubleshooting#size on: Today at 12:57:42 pm
Where can I find JKISS32

Look up.

Quote
or Xorshift algorithm

https://code.google.com/p/arduino-tiny/source/browse/cores/tiny/tc_random_XorShift.cpp?repo=core2

Quote
(Java and Arduino)

Needy thing, aren't ya?

Quote
with Seed to get the same number with regard to this Seed?

Are you asking for a pseudo-random number generator?
4  Using Arduino / Programming Questions / Re: Issues with strstr_P (PROGMEM) on: Today at 03:43:57 am

Try this...
Code:
void setup() {
  //WITH PROGMEM
  static char foo1[] = "With PROGMEM is not working";
  static char foo2[] PROGMEM = "is";
  char *foo3 = strstr_P(foo1, foo2);
 
  //WITHOUT PROGMEM
  char *foo4 = "Without PROGMEM is working";
  char *foo5 = "is";
  char *foo6 = strstr(foo4, foo5);
 
  Serial.begin(9600);
 
  //RESULT
  if ( foo3 != NULL )
    Serial.println( foo3 );
  else
    Serial.println( F( "NULL" ) );
 
  Serial.println(foo6);
 
}

void loop() {
  // put your main code here, to run repeatedly:

}
5  Using Arduino / Installation & Troubleshooting / MOVED: Problems with AREF on: August 31, 2014, 10:25:38 pm
This topic has been moved to General Electronics.

http://forum.arduino.cc/index.php?topic=264255.0
6  Using Arduino / Project Guidance / Re: Timer 0 overflow interrupt on: August 31, 2014, 03:49:48 pm

Enable the pin change interrupt on one of the two output pins.  Start the PWM output (analogWrite will work).  Trigger a conversion in the pin change interrupt handler.

Quote
I want to have a variable to generate accurate delays without having to compare the milis function every loop.

...is an extremely weak argument for using interrupts.
7  Using Arduino / Programming Questions / Re: Help required coding rules comparing received data to float and fixed values on: August 31, 2014, 03:24:56 pm
...the attached file is unusable because it has an extra line-feed between every line...

@Robin2, you need to find yourself a better source code editor.  I use Visual Studio, Delphi, and sometimes Programmer's Notepad (it comes with the Arduino IDE).
8  Using Arduino / Programming Questions / Re: Help required coding rules comparing received data to float and fixed values on: August 31, 2014, 03:17:40 pm
The sensors are produced by Ambient Weather, I did not build them myself. I have not been able to crack the checksum and they are not able to provide the details to me (I asked them). I have asked for help on several forums and learnt a lot about CRC, but no success so far.

Really?  It took me about 10 seconds of Googling to find this...
http://lucsmall.com/2012/04/29/weather-station-hacking-part-2/

Quote
The final 8 bits of the packet are a CRC-8 over the payload - i.e. over the four preceding bytes. (The preamble is not included in the CRC). The CRC-8 polynomial used is x^8 + x^5 + x^4 + 1.

Query...
https://www.google.com/search?q=Ambient+Weather+wireless+protocol+434mhz
9  Using Arduino / Programming Questions / Re: Increase PWM frequency on: August 31, 2014, 03:34:29 am

@Anduriel, do not cross-post...
http://forum.arduino.cc/index.php?topic=263444.0

Thread locked.
10  Using Arduino / Installation & Troubleshooting / Re: Trojan on WinAvr Gcc detected on: August 31, 2014, 03:00:26 am

The other report is from Rising Anti-virus Software.  The internet is rife with reports of false-positives from their software.  They ceased operations about a year ago.  Guess why they ceased operations?
11  Using Arduino / Installation & Troubleshooting / Re: Trojan on WinAvr Gcc detected on: August 31, 2014, 02:51:40 am
Quote
JS.A.Pakes.28840282

The "JS" means it malicious JavaScript.  The install is not JavaScript.  There is no JavaScript contained within the install.  Guess what that means about ViRobot?
12  Using Arduino / Installation & Troubleshooting / Re: Trojan on WinAvr Gcc detected on: August 31, 2014, 02:47:09 am
Then i scanned it online to virustotal and it has found two threats.

Looks more like zero...

Quote
Probably harmless! There are strong indicators suggesting that this file is safe to use.
13  Using Arduino / General Electronics / Re: Ohm's Law. on: August 30, 2014, 04:43:41 pm

Exactly.
14  Using Arduino / General Electronics / Re: Ohm's Law. on: August 30, 2014, 03:52:29 pm
Assuming that 00 0000 0000 is 0V then the divisor must be 1023.

Your assumption is wrong.  00 0000 0000 is not zero volts.  It is a voltage range which includes zero.  That is the way a successive approximation converter works.
15  Using Arduino / Microcontrollers / Re: Programming attiny15L using arduino isp on: August 30, 2014, 01:01:11 pm

You can probably use avrdude.  As I already stated, the protocol looks similar to the protocol of more modern processors.

If the t15L is not in the avrdude.conf file you will have to create an entry. 

You can probably use ArduinoISP because it uses a fixed delay.  You will not be able to use TinyISP because it polls (which is not supported by the t15L).
Pages: [1] 2 3 ... 974