Pages: [1]   Go Down
Author Topic: Open console by programm  (Read 250 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi everybody,
For some apps I'm developping on Arduino Yun I would like to open the console by programm.
I succeed in doing so when Arduino Yun is connected via serial interface. Below the code I've used.
Code:
#include <Serial.h>
#include <Keyboard.h>

int count;

void setup() {
  // put your setup code here, to run once:
  //Bridge.begin();
  Serial.begin(9600);
  // wait for the console
  //while (!Console) {
  //  Console.println("Console Ok");
    }

  Keyboard.begin();
  Keyboard.press(KEY_LEFT_CTRL);
  Keyboard.press(KEY_LEFT_SHIFT);
  Keyboard.press('M');
  Keyboard.releaseAll();

}

void loop() {
  // put your main code here, to run repeatedly:
  count += 1;
  //Keyboard.write('M');
  Serial.println(count);
  delay(1000);
}
I would like to do the same when Arduino Yun is connected thru WiFi.
I've modified the above sketch like this:
Code:
#include <Bridge.h>
#include <Console.h>
#include <Keyboard.h>

int count;

void setup() {
  // put your setup code here, to run once:
  Bridge.begin();
  Console.begin();
  // wait for the console
  //while (!Console) {
  //  Console.println("Console Ok");
    }

  Keyboard.begin();
  Keyboard.press(KEY_LEFT_CTRL);
  Keyboard.press(KEY_LEFT_SHIFT);
  Keyboard.press('M');
  Keyboard.releaseAll();

}

void loop() {
  // put your main code here, to run repeatedly:
  count += 1;
  //Keyboard.write('M');
  Console.println(count);
  delay(1000);
 
}

But no success!
Somebody could tell me if what I would like to do is possible, and if yes how to do it.
Thanks in advance and regards
Fabio
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 631
Posts: 50115
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Somebody could tell me if what I would like to do is possible, and if yes how to do it.
Does your router understand Keyboard commands? That's where the data is going.
Logged

Pages: [1]   Go Up
Jump to: