Show Posts
Pages: 1 2 [3] 4 5 ... 1889
31  Using Arduino / Programming Questions / Re: Simple IF Statement Error on: August 21, 2014, 08:53:38 am
Did you mean
Code:
if ( ! FreqMeasure.available()) {
    Serial.print("No reading");
}
?
32  General Category / General Discussion / Re: kickstarter - what a crock! on: August 21, 2014, 07:39:11 am
I'd be more comfortable with his competency if he could spell "MHz" correctly.
33  General Category / General Discussion / MOVED: Hallo bin neu hier on: August 21, 2014, 07:34:14 am
This topic has been moved to Deutsch.

http://forum.arduino.cc/index.php?topic=262169.0
34  Using Arduino / Project Guidance / Re: using arduino to trigger flash a unit? help. on: August 21, 2014, 07:20:55 am
Quote
the MOC2030 has 5 pins how can I connect ?
The ones I have have six pins.

Pins 1 and 3 are the LED, 4 and 6 the output, IIRC.
Datasheets should be online.
35  Using Arduino / Project Guidance / Re: using arduino to trigger flash a unit? help. on: August 21, 2014, 07:00:53 am
What is the trigger voltage on the flash?

Have you tried reversing the polarity of the opto-coupler's output?

Or try a MOC2030 opto-triac.

36  Using Arduino / Project Guidance / Re: Need help in making a FM station with Arduino on: August 21, 2014, 06:53:20 am
Just try any reasonably straight 75cm length of single conductor wire on the RF output.

AND DON'T CROSS-POST, IT WASTES TIME.
37  Using Arduino / Project Guidance / Re: Need help in making a FM station with Arduino on: August 21, 2014, 06:45:50 am
I'd start with about a 1.5metre dipole.
I think you're expecting a lot of a very low power module though, and the antenna may make the device illegal.
38  Using Arduino / Project Guidance / Re: While wiht complex condition not executing on: August 21, 2014, 06:38:34 am
Did you really solve it?
First thing you should do is to remove the semicolon after the while-condition...
Rubbish - it's a do..while, not a while loop
39  Using Arduino / Project Guidance / Re: Need help in making a FM station with Arduino on: August 21, 2014, 06:37:01 am
From the linked article
Quote
you can connect an external antenna to increase the range of transmitter .
40  Using Arduino / Programming Questions / Re: Add timestamp during compile on: August 21, 2014, 06:35:10 am
You'd be better off with
Code:
  Serial.begin (115200) ;
  Serial.print (F(__DATE__)) ;
  Serial.print (" ") ;
  Serial.println (F(__TIME__)) ;
41  Using Arduino / Project Guidance / Re: Programming Spectrum Analyzation on: August 21, 2014, 05:34:10 am
"Arduino spectrum analyser" only returned 16800 hits on Google.
Ho-hum, better try Bing.
42  Using Arduino / Programming Questions / Re: Weird program behaviour when using interrupts on: August 21, 2014, 03:30:51 am
Code:
void sendSensorValue(int sensorID, float sensorValue)
{
  RFSensorData RFdata;
  RFdata.sensorID = sensorID;
  RFdata.sensorValue = sensorValue;
  byte buflen = sizeof(RFdata);
  byte buf[buflen];
  memcpy(&buf, &RFdata, buflen);
  driver.send(buf, buflen);
  driver.waitPacketSent();
}
or
Code:
void sendSensorValue(int sensorID, float sensorValue)
{
  RFSensorData RFdata = {sensorID, sensorValue};
  driver.send((byte*)&RFdata, sizeof(RFdata));
  driver.waitPacketSent();
}
43  Using Arduino / Programming Questions / Re: Weird program behaviour when using interrupts on: August 21, 2014, 03:16:46 am
Quote
void S0interrupt()
{
  unsigned long currentInteruptMillis = millis();
  //Wait 5 ms and recheck pin to be sure it's low after 5 ms
  delay(5);
Weird use of "delay()" in interrupt context.
44  Using Arduino / Programming Questions / Re: (byte*)(void*)&value ??? on: August 21, 2014, 02:27:01 am
With
Code:
(byte*)&value
, even with the strictest compiler options I could find
Quote
-O0 -fno-elide-constructors -pedantic-errors -ansi -Wextra -Wall     -Winit-self -Wold-style-cast -Woverloaded-virtual -Wuninitialized -Wmissing-declarations    -Winit-self -std=c++98
, the worst you get is a warning "use of old-style cast", which can be cured by a reinterpret cast.
Code:
byte* p = reinterpret_cast <byte*>(&value);

The double cast "(byte*)(void*)" simply gives you two old-style cast warnings,
45  Using Arduino / Programming Questions / Re: (byte*)(void*)&value ??? on: August 21, 2014, 01:55:32 am
Code:
byte* p = (byte*)(void*)&value;
If you break it down, working from right to left, "value" is an "int", so the type of "&value" is "pointer to int", aka "int*".
So then they cast "int*" to "void*" (an anonymous, vanilla pointer) and then cast "void*" to "byte*".
There could have been any number of casts between "&value" and "(byte*)", but the outcome would have been the same.
Pages: 1 2 [3] 4 5 ... 1889