Show Posts
Pages: 1 2 3 [4] 5 6 ... 9
46  Products / Arduino Yún / Re: Node.js and on the yun on: May 15, 2014, 04:05:55 am
super good! thanks!
47  Products / Arduino Yún / Re: Node.js and on the yun on: May 09, 2014, 01:07:32 pm
just a feedback:
with the fibasile compiled ws module and then `npm install` everything seems to work fine
48  Products / Arduino Yún / Change wifi connection (without ssh) on: May 09, 2014, 12:19:12 pm
I tried the yun in a different place rather then home, with a different wifi connection.
It was not very clear from the tutorial how to reconfigure the wifi and reset the wifi name and password. I cannot access to the linux machine by ssh (the linux machine not connected in the new wifi) and the access point was not up (I don't know if it is intended to be up if it can not connect to the wifi).
But I could do something from the atmega.. (I love this yun & bridge system, really, super good job)

I share my small sketch, maybe  could be useful to someoneelse!
Please tells me if anyone has some advice or some fixes


  Based on:
    Examples > Bridge > Process
    Running process using Process class by Cristian Maglie
    Examples > Bridge > WifiStatus
    WiFi Status by Federico Fissore
  This example code is in the public domain.

#define NEXT_PAGE "..........................................................................."
#include <Process.h>

void setup() {
  while (!Serial);

void loop() {
  if (Serial.available() > 0) {
    int in = -'0';
    switch(in) {
      case 1: runCpuInfo();  break;
      case 2: runCurl();     break;
      case 3: runScan();     break;
      case 4: runLua();      break;
      case 5: runCat();      break;
      case 6: runIfconfig(); break;
      case 7: runWifiup();   break;
      default: Serial.println("Enter a number between 1 and 7");

void printMenu() {
  Serial.println("\n\n\nNetwork Utility");
  Serial.println("1. cpu info");
  Serial.println("2. curl test");
  Serial.println("3. scan networks in range");
  Serial.println("4. print wifi status");
  Serial.println("5. print network config files");
  Serial.println("6. print active networks");
  Serial.println("7. activate access point");

void runLua() {
  Process p;

void runCurl() {
  Process p;

void runCpuInfo() {
  Process p;

void runScan() {
  Process p;

void runIfconfig() {
  Process p;

void runCat() {
  Process p;

void runWifiup() {
  Process p;

void printShellOutput(Process &p) {
  while (p.available() > 0) {
    char c =;

49  Products / Arduino Yún / Re: Check if connected to Internet. on: May 09, 2014, 09:46:27 am
In the examples you'll find also WiFiStatus under Bridge that could help
50  Products / Arduino Yún / Re: Some advice on user feedback on first cold boot of Yun on: May 09, 2014, 09:22:05 am
I know could be totally irrelevant to this post but the new image show if the linux machine is booted with a bright white led
Linux side ready visual notification: when linux boot completes, the usb led lights up (it's bright white)
so with the new image white led == bridge is up
51  Products / Arduino Yún / Re: Node.js and on the yun on: May 08, 2014, 10:39:08 am
..nodejs is not the problem. the problem is
what I have already done: upgrade at the last image, expand with an external sd card for the boot and install node.js via `npm install node`. everything works like a charm.

node.js is working, but try to install via `npm install` fails (after more then 10 minutes ssh session crashes and `require('')` from node console gets some errors like "Error: Cannot find module 'zeparser'", same for `require('ws')`).
but Federico answer explains why smiley

anyway! I was not aware of ws module compiled for websocket in fbasile repository, I'll try it out, thanks!
52  Products / Arduino Yún / Re: Node.js and on the yun on: May 08, 2014, 09:19:53 am
what can I say? wow!
so.. I'll wait till the end of the next week.
Just three more question:

1) where can I follow the development?
I don't see the node package (even if I installed it by the `opkg node install` with the new openwrt-ar71xx-generic-yun-16M-squashfs-sysupgrade image following the cool tutorial and the arduino sketch that worked like a charm)

2) are there more stable examples of web sockets? maybe with python.. in another post I've seen that websocket&python are used in space brew.
The python websocket lib is the one from Hiroki Ohtani (liris).. but I didn't found examples or tutorial on that. Is there any well-tested and documented websocket lib available?

3) just to not to lie down in the xy problem ( ):
I want a web page be notified without refreshing it when something is happening in the board (i.e. a pushbutton is pressed).
As far as I have understood I have to open a double way communication between the server and the client, if I don't want a continuous polling (like the where the js setInterval continuously ask the serve status) - and mainly I don't want to not overload the network.
I think that with node.js could be a nice option.
Is there something obvious that I'm not aware of?

Sorry if this is a dumb question, I'm new to this internet-of-things stuff.
53  Products / Arduino Yún / Node.js and on the yun on: May 08, 2014, 05:45:07 am
I'm wondering if anyone uses module for node.js, if it has sense or it is too much for the linino
54  International / Software / Re: problema ordinamento file con sd card on: May 06, 2013, 09:45:42 am
ok ho trovato il problema, sembra che mac osx copi i file in parallelo quindi qualcuno viene scritto prima qualcuno viene scritto dopo..

sapete come fare la copia in serie? nel senso: copia il primo,aspetta che finisca, copia il secondo, aspetta che finisca, etc..


o con mac osx o con qualche scriptino bash/python va bene lostesso..
55  International / Software / Re: problema ordinamento file con sd card on: May 06, 2013, 08:22:54 am
si sembra proprio così, i file vengono ordinati in base alla data di scrittura grazie ragazzi
56  International / Software / problema ordinamento file con sd card on: May 05, 2013, 03:56:10 pm
ciao a tutti, sto usando la mp3 player shield della sparkfun che usa la micro sd.
non riesco a capire come ordinare i files..
io li vorrei semplicemente.. in ordine.
ho usato questa nomenclatura:


solo che non capisco proprio perchè, ma se eseguo questa funzione (che è nell'esempio della libreria della scheda)

void playFile(long fn_index) {
  SdFile file;
  char filename[13];
  uint16_t count = 1;
  while (file.openNext(sd.vwd(),O_READ))
    if ( isFnMusic(filename) ) {

      if (count == fn_index) {
        Serial.print(F("Index "));
        SerialPrintPaddedNumber(count, 5 );
        Serial.print(F(": "));
        Serial.print(F("Playing filename: "));
        int8_t result = MP3player.playMP3(filename);
        //check result, see readme for error codes.
        if(result != 0) {
          Serial.print(F("Error code: "));
          Serial.println(F(" when trying to play track"));

legge i file apparentemente a caso..
come posso fare con che ordine vengono letti??
57  International / Hardware / arduino lillypad e accellerometri on: January 03, 2013, 09:55:51 am
ciao a tutti vorrei attaccare questo accellerometro ad un lillypad:
sono riuscito ad usarlo bene con un arduino uno con il pin da 3.3v ma con lillypad (che alimento tramite batteria) non saprei cosa usare per non bruciare il sensore.. qualche idea?
58  International / Hardware / saldature: perchè usare le millefori quando esistono le stripboard? on: November 19, 2012, 04:45:53 am
ciao a tutti..
mi sono sempre considerato un animale nel saldare: dovevo saldare due pin vicini e ho sempre fatto un gran macello, saldature brutte da vedere, incerte, facevano contatti strani, etc

poi un giorno ho scoperto le stripboard. e la vita mi è cambiata. sono semplicissime da usare, si risparmia filo, vengono fuori dei layout belli e facili da capire, lo stagno si distribuisce in maniera perfetta sulle piste.

perchè usare le millefori normali? a cosa si usano? e soprattutto.. come fare a saldare lì sopra dei pin vicini??
59  Using Arduino / Networking, Protocols, and Devices / Re: lowering I2C speed with arduino UNO on: November 18, 2012, 06:20:52 am
i doesn't have pullup resistor.. i thought the internal one was ok..

EDIT: great page anyway, thanks!
60  Using Arduino / Networking, Protocols, and Devices / lowering I2C speed with arduino UNO on: November 17, 2012, 08:11:47 am
i am not an arduino guy, and i have a poor electronic background. i use arduino only for fun in the spare. and this is my first project with multiple arduino communications. so sorry me if i write stupid things (and sorry for my bad english, too).

i have some boards that are communicating with i2c. but for reduce the noise signal i have set the velocity of the communication slower (following this:,12518.0.html ). the noise is caused by the long wire (more then 2 meters).

Yeah ok i know i should use some bus extender and this is a dirty hack, but for now it seems to works. I have tested it with the new Arduino Leonardo and it works right. One master (the master is an arduino MEGA), 2 leonardo childs, no problem. But it seems to have problem with older arduino (Arduino UNO).

I have tested it with a simple sketch, with one master and one slave: the master request one byte of status (0 or 1, ready or busy) each 500 milliseconds and if master recive something from serial, it send a number from 0 to 9999 to the slave (and the slave stay busy for that number of milliseconds).

Same code, same wiring (3 wires from master to slave: gnd, slc, sda), with a leonardo as slave, no problems, with UNO as slave, after the first request the communication crashes (and cause also the master to crash because there is no timeout in standard wiring library - untill i unplug the slave).

Some advice or any consideration of any kind?
Pages: 1 2 3 [4] 5 6 ... 9