Show Posts
Pages: [1] 2
1  Using Arduino / Programming Questions / Re: Keyboard.write problem. on: October 23, 2013, 12:22:37 pm
TY Mike, that is what I suspected

TYVM
2  Using Arduino / Programming Questions / Keyboard.write problem. on: October 23, 2013, 12:02:47 pm
Hello, I'm working on a project with arduino leonardo, which sent a sentence trougth the serial port and get an int variable that I use in "keyboard.write" for example "Keyboard.write (125)," In theory according to table would have to print the ascii character "}" but prints "*". but works well with letters, numbers and the "modifier keystrokes" Any idea what could be happening?

Here is some code:

Code:
 
while (Serial.available()) //Sumo uno tras otro los caracteres seriales y creo una string.
  {
    delay(3);  //delay to allow buffer to fill
    if (Serial.available() >0) {
      char c = Serial.read();  //gets one byte from serial buffer
      readString += c; //makes the string readString
    }

  if(readString.startsWith("KW")) //KwyWrite, preciona una tecla y la suelta inmediatamente.  ejemplo KW065 o KP65
  {
    String KeyStrokevalue = readString.substring(2, readString.length()); //Obtengo el valor del KeyStroke
    Serial.println(KeyStrokevalue.toInt());
    Keyboard.write(KeyStrokevalue.toInt());
    readString="";
  }
 
3  Using Arduino / Microcontrollers / Re: attiny 85, any pointers?/ on: April 26, 2013, 12:18:37 pm
Stanly thanks u so much for ur support, now i got it working!!!
4  Using Arduino / Microcontrollers / Re: attiny 85, any pointers?/ on: April 26, 2013, 10:02:52 am
Thank u Erni, now its working good, i got this ouput:

Code:
RF_CH :4C
RF_SETUP :110
TX_ADDR :E3F0F0F0F0
RX_ADDR :E2F0F0F0F0
üÿSent :E3,0001,000000
üSent :E3,0001,000001
üSent :E3,0001,000002

Now i need to meke the reciever (on arduino UNO).
Any hint on how i need to proceed?
5  Using Arduino / Microcontrollers / Re: attiny 85, any pointers?/ on: April 26, 2013, 07:28:12 am
Quote
Stanley, sadly i cant work whit TinyDebugSerial becouse i only got an arduino uno and the serial adaptor seems dont work whitout the atmega328.

How are you setting up yr components ?
attiny - nRF  <==2.4Ghz==> nRF - Arduino UNO ???

Exactly that way, what I meant is that I have an Arduino UNO to use as serial adapter. what I do is connect the pin 2 of the ATtiny, with the RX pin of the UNO without the M328 chip.

So I wanted to make a receiver to see if it really is sending something. So far, nothing
6  Using Arduino / Microcontrollers / Re: attiny 85, any pointers?/ on: April 25, 2013, 04:34:18 pm
Stanley, sadly i cant work whit TinyDebugSerial becouse i only got an arduino uno and the serial adaptor seems dont work whitout the atmega328.

I make this sketch to test if im getting something, but sadly seems not work.

Code:
[pre][left]

void setup()
{
  Serial.begin(9600);
  Mirf.spi = &MirfHardwareSpi;
  Mirf.init();
 
  byte RADDR[] = {0xe2, 0xf0, 0xf0, 0xf0, 0xf0};
  Mirf.setRADDR(RADDR);
  
  Mirf.payload = sizeof(unsigned long);
  Mirf.channel = 0x4c;
  Mirf.config();
  
  Serial.println("Listening...");
 
}


int data;


void loop()
{
   if(Mirf.dataReady())
   {Serial.print("Incoming data-....");
    
     Mirf.getData((byte *) &data);
     Serial.println(data);
     delay(100);
    
   }


data=0;

}
[/left][/pre]

Im doing it something wrong? maybe its about the dinamic payload?

here si the tx code

Code:
void setup(){
  Mirf.cePin = CE;
  Mirf.csnPin = CSN;
  Mirf.spi = &MirfHardwareSpi;
  Mirf.init();

  // This address is compatible with my example of rpi-hub or nRF24_Arduino_as_hub
  // at repo https://github.com/stanleyseow/RF24/examples/
 
  byte RADDR[] = {0xe2, 0xf0, 0xf0, 0xf0, 0xf0};
  byte TADDR[] = {0xe3, 0xf0, 0xf0, 0xf0, 0xf0};
 
  Mirf.payload = sizeof(buffer);
 
  Mirf.channel = 0x4c; // Same as rpi-hub and sendto_hub
  Mirf.rfsetup = 0x06; // 1Mbps, Max power
  Mirf.setRADDR(RADDR); 
  Mirf.setTADDR(TADDR);
  Mirf.config();
 
  // Enable dynamic payload
  Mirf.configRegister( FEATURE, 1<<EN_DPL );
  Mirf.configRegister( DYNPD, 1<<DPL_P0 | 1<<DPL_P1 | 1<<DPL_P2 | 1<<DPL_P3 | 1<<DPL_P4 | 1<<DPL_P5 );
   
}

void loop(){
 
  uint8_t sent = false;
 
  Mirf.send(buffer);
  while( Mirf.isSending() )
  {
    delay(1);
    sent = true; // Sent success
  }

  delay(400);
  if (sent) {   // Blink CE ( pin 2), 3 times
      digitalWrite(3,HIGH); 
      delay(100);
      digitalWrite(3,LOW); 
      delay(100);
      digitalWrite(3,HIGH);
      delay(100);
      digitalWrite(3,LOW); 
      delay(100);
      digitalWrite(3,HIGH);
      delay(100);
      digitalWrite(3,LOW); 
      delay(100);
  } else {
      digitalWrite(3,LOW);  // Sent not success, OFF the LED
      delay(600);
  }

}
7  Using Arduino / Microcontrollers / Re: attiny 85, any pointers?/ on: April 24, 2013, 04:37:19 pm
I just got the ATTINY85 from sparkfun, I tried it with the stanley examples that put on github and it works great, at least I have the LED flashing 3 times. Now i need to make the receiver with the Arduino UNO and see what actually receive.
8  Using Arduino / Microcontrollers / Re: attiny 85, any pointers?/ on: April 10, 2013, 04:17:28 pm
Spectacular work stanley thanks for the work that you had done to collect everything in one place.

Thanks.
9  Using Arduino / Microcontrollers / Re: attiny 85, any pointers?/ on: April 07, 2013, 06:26:02 pm
I already make the changes to the file to make it work with the ATTINY44, also change files mirf.cy mirf.h setup.c fail me burn only the ATtiny, I'll do that tomorrow also see what I can do I'll take a look at your code because I have only one module NRF24L01 free to use
10  Using Arduino / Microcontrollers / Re: attiny 85, any pointers?/ on: April 07, 2013, 05:39:11 pm
sorry if bother you was not my intention, my question was just to ask if it was possible to make it work, do not spend more time on this library because I had found the one I posted recently, now I have at least two options to try.
11  Using Arduino / Microcontrollers / Re: attiny 85, any pointers?/ on: April 07, 2013, 05:30:41 pm
Take a look at this example, use the same ATTINY85 and within comments puts another example using a ATTINY44.

http://www.insidegadgets.com/2012/08/22/using-the-nrf24l01-wireless-module/
12  Using Arduino / Microcontrollers / Re: attiny 85, any pointers?/ on: April 06, 2013, 03:17:13 pm
someone could run the library with ATTINY44?
13  Using Arduino / Microcontrollers / Re: Leonardo Clone 32u4 based board it is not recognized in USB port on: April 03, 2013, 06:39:02 pm
Sounds more like harware problem, can u post the schem?.

I thinking on a leak of capacitive on the UCap.

Try to use the same layout of the leonardo.
14  Using Arduino / Interfacing w/ Software on the Computer / Leonardo Mouse Resolution on: April 01, 2013, 03:45:12 pm
Hi guys, im trying to implement this modification to the arduino leonardo:

http://arduino.cc/forum/index.php/topic,94140.msg707121.html#msg707121

Everything work rigth, but i want to incress the resolution of the mouse, for example to work in a 1920x1080 screen.

But i cant make it work, anyone got the same problem?
15  Using Arduino / Programming Questions / Re: Atmega 48? on: November 12, 2012, 06:52:04 pm
Well ill awnser myself.

To get working an atmega48 whit arduino ide, just add this board to Boards.txt in the arduino directory.

Code:
atmega48.name=Rotceh-hack QM7298 w/ ATmega48V xD

attiny48.upload.using=arduino
atmega48.upload.maximum_size=4094
atmega48.upload.speed=19200

atmega48.bootloader.low_fuses=0xE2
atmega48.bootloader.high_fuses=0xDF
atmega48.bootloader.extended_fuses=0xFF
atmega48.bootloader.path=atmega
atmega48.bootloader.file=atmega48.hex
atmega48.bootloader.unlock_bits=0x3F
atmega48.bootloader.lock_bits=0x0F

atmega48.build.mcu=atmega48
atmega48.build.f_cpu=8000000L
atmega48.build.core=arduino
atmega48.build.variant=standard

Source: http://forums.hackaday.com/viewtopic.php?f=2&t=2161

Then just compile ur scketch and upload it whit avrdude in command promp.

Or if u want upload it whit the arduino interfaz ull need to modifie the avrdude.conf file ( arduino-1.0.1\hardware\tools\avr\etc) and change the signature of the atmega48.
Pages: [1] 2