Show Posts
Pages: [1]
1  Using Arduino / Programming Questions / Re: const char and Strng on: April 28, 2013, 03:02:59 pm
Yes.... But how? can you give me a fix?
2  Using Arduino / Programming Questions / Re: const char and Strng on: April 28, 2013, 02:56:24 pm
Sorry, didn't see i updated the message.

Code:
ZenderWeer.ino: In function 'void loop()':
ZenderWeer:19: error: invalid conversion from 'int' to 'char*'
3  Using Arduino / Programming Questions / Re: const char and Strng on: April 28, 2013, 02:51:41 pm
How do i solve this?

Code:
ZenderWeer.ino: In function 'void loop()':
ZenderWeer:19: error: invalid conversion from 'int' to 'char*'

Code:
#include <VirtualWire.h>
#include <dht.h>
#define dht_dpin A0

dht DHT;
void setup()
{
   
 
    vw_set_ptt_inverted(true);  // Required by the RF module
    vw_setup(2000);            // bps connection speed
    vw_set_tx_pin(3);         // Arduino pin to connect the receiver data pin
}
 
void loop()
{
   DHT.read11(dht_dpin);
int temp = (DHT.humidity);
char* temperature = temp;

  const char *msg = temperature;
   vw_send((uint8_t *)msg, strlen(msg));
   vw_wait_tx();        // We wait to finish sending the message
   delay(200);         // We wait to send the message again               
}
4  Using Arduino / Programming Questions / const char and Strng on: April 28, 2013, 02:34:31 pm
Hi,

I'm trying to send a message over a wireless module,
I need to send a string of text but i'm getting a error:
How do i fix this problem?
Code:
sketch_apr28a.ino: In function 'void loop()':
sketch_apr28a:14: error: cannot convert 'String' to 'const char*' in initialization

Code:
#include <VirtualWire.h>
void setup()
{
 
    vw_set_ptt_inverted(true);  // Required by the RF module
    vw_setup(2000);            // bps connection speed
    vw_set_tx_pin(3);         // Arduino pin to connect the receiver data pin
}
 
void loop()
{
  String message = "Test";

   const char *msg = message;
   vw_send((uint8_t *)msg, strlen(msg));
   vw_wait_tx();        // We wait to finish sending the message
   delay(200);         // We wait to send the message again               
}
5  Topics / Device Hacking / Re: Arduino to Printer through Parallel Port on: October 25, 2012, 01:56:47 pm
Worked perfectly!
-Canon scaaning device.
But how can i control the scanner with the Arduino sutch as move the scan bar or turn on the scan light?
Thanks!
Pages: [1]