Show Posts
Pages: [1] 2 3 ... 12
1  Products / Arduino Yún / Re: Arduino Yun - SD card mount problem on: July 26, 2014, 05:32:29 pm
I contacted with a technician from Arduino R&D department. It seemed that there is a hardware problem only with my YUN.
2  Products / Arduino Yún / Re: Arduino Yun - How to close http client connections? on: May 20, 2014, 07:06:53 am
What you're doing is fine.

HttpClient inherits from Process, and is implemented by calling curl on the Linux side. The destructor for Process calls close(), so this will be called when your client instance is destroyed before loop() returns.

On the server side ,It looks like it never closes the http get request, but timeouts after sometime.
3  Products / Arduino Yún / Arduino Yun - How to close http client connections? on: May 09, 2014, 12:22:41 am
Hi there!
I am using this sketch code for Arduino Yun to make Http Connetions, but i want to close the connections each time I make them.

In arduino Ethernet there was client.stop function.

what can I do in Arduino Yun?

Code:
#include <Bridge.h>
#include <HttpClient.h>

void setup() {
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
  Bridge.begin();
  Serial.begin(9600);
  while(!Serial);
}

void loop() {
  HttpClient client;
  client.get("http://arduino.cc/asciilogo.txt");

  while (client.available()) {
    char c = client.read();
    Serial.print(c);
  }
  Serial.flush();

  delay(5000);
}
4  Products / Arduino Yún / Re: Arduino Yun - SD card mount problem on: May 07, 2014, 01:55:03 pm
I cant do anything to fix the problem?
5  Products / Arduino Yún / Arduino Yun - SD card mount problem on: May 07, 2014, 11:18:41 am
Dear commmunity,

I've been struggling to make Arduino Yun to recognise my sd cards for over 2 days with no luck.
I am using "dmesg" to see if it is recognised but i cant see any /dev/sda or something.

I dont understand what the problem is.. Many other people are expieriencing problems mounting and soft linking the sd, but my issue is stranger because my sd is not recognised by openwrt.

Can someone help me with this issue?

I am working over WiFi, using putty ssh terminal. I have also copied the dmesg log.
Have formatted my sd card 8GB to NTFS & my SD card 2GB to FAT32. None of them are recognised.

I have powered off my yun and then porwered it on (sd card always connected), and through terminal ran the command dmesg.

Here is the log:
http://pastebin.com/07VSVinJ
6  Using Arduino / Networking, Protocols, and Devices / Re: Xbee Communication - Receiving some strange characters on: April 27, 2014, 03:44:36 pm
Just found out that my problem was with my I/O settings!!! smiley-grin

I had a digital Input pin enabled (DI00), Pull up resistor 0 and Samples Rate before TX 5.
Samples Rate before TX is sending the strange characters.
I managed to solve it by setting Samples Rate TX to 0, but now i am unable to use the I/O pins, just the serial.

What are the correct settings to use xbee I/O pins and also have godd serial communication without strange characters?
7  Using Arduino / Networking, Protocols, and Devices / Re: Xbee Communication - Receiving some strange characters on: April 27, 2014, 03:28:29 pm
In settings you can see SH and SL numbers.

To Receiver DH write Transmitter SH, and to Receiver DL write Transmitter SL.

To Transmitter DH write Receiver SH, and to Transmitter DL write Receiver SH.


I think there is something wrong. Shouldn't I write to transmitter DL the receiver SL?
8  Using Arduino / Networking, Protocols, and Devices / Re: Xbee Communication - Receiving some strange characters on: April 27, 2014, 10:38:17 am
Hmm...maybe you just lost some packets.

Try to write Destination address HIGH and Destination address LOW to both xbee's. Maybe it will help you with losing the packets.
What should i write?
9  Using Arduino / Networking, Protocols, and Devices / Re: Xbee Communication - Receiving some strange characters on: April 27, 2014, 08:53:36 am
I dont lose any of the packets I send. The counter goas like that: counter= counter+5;

So I get the correct info but some more characters too.
10  Using Arduino / Motors, Mechanics, and Power / Quadstep library - serial sending "error: incorrect value for motor_go" on: April 27, 2014, 08:34:18 am
Hi there,
I am having a rare issue.
I a having a strange error message when I call the motor_go() function, which is "error: incorrect value for motor_go"

It seems that everything is working but I cant understand why this message appears. Can someone take a look in the library files so we  found out what causes this problem? The serial command can be found in quadstep.cpp file. I took a look but had no luck.
I think I am using everythin correctly.

I also havent soldered anything on the quadstep board.

Please help!
Code:
Code:
/*
  SparkFun Electronics 2011
  Aaron Weiss, aaron at sparkfun dot com
  Beer-ware License: You can do whatever you want with this sketch.
                     If we meet someday, you can buy me a beer.

  QuadSetpper Example Sketch. For use with an Arduino Mega2560 and
  a 1.8 degree bipolar stepper motor.

  You must connect the STP pin for each motor as shown below.
  For rest of the pins, you choose where they go.

  Motor1 STP pin: mega pin 11
  Motor2 STP pin: meag pin 5
  Motor3 STP pin: meag pin 6
  Motor4 STP pin: mega pin 46

  Library Usage:

  motor_pins(x,y,z,l,m,n)
  x: motor channel number
  y: enable pin assignment
  z: direction pin assignment
  l: MS1 pin assignment
  m: MS2 pin assignment
  n: MS3 pin assignment

  motor_go(x,y,z,l)
  x: motor channel number
  y: step size: 1, 2, 4, 8, or 16
  z: increments for given step size
     for full step: 1 increment = 1.8deg
     for half step: 1 increment = 0.9deg and so on
     negaitve numbers rotate in the opposite direction
  l: torque/speed (0-10), 0 is high speed/low torque/low current
                          10 is low speed/high torque/high current (2.0A max)

  stall(x)
  x: motor channel number
*/

// include the motor library
#include <quadstep.h>

// create an instance of the class motor
quadstep quadstep;

void setup() {
  Serial.begin(9600);
  // assign the pin connections
  quadstep.motor_pins(1, A1, 36, A8, A9, A10); //ch 1
  quadstep.motor_pins(2, 10, 9, 8, 7, 4); //ch 2
  quadstep.motor_pins(3, 22, 23, 24, 25, 26); //ch 3
  quadstep.motor_pins(4, 27, 28, 29, 30, 31); //ch 4

}

//1.8deg = 1step
void loop() {

  // step motor 4 for 200 increments CW
  quadstep.motor_go(1, 8, 50, 2);
  delay(5000);
  // step motor 4 for 200 increments CCW
  quadstep.motor_go(1, 8, -50, 2);
  delay(2000);

  // holds the motor in one position with full torque/current
  //quadstep.stall(1);
  //delay(500);

  // step motor 4 for 200 increments CW
  quadstep.motor_go(2, 1, 30, 2);
  delay(2000);
  // step motor 4 for 200 increments CCW
  quadstep.motor_go(2, 1, -30, 2);
  delay(2000);

  // holds the motor in one position with full torque/current
  //quadstep.stall(1);
  //delay(500);


  // step motor 4 for 200 increments CW
  quadstep.motor_go(3, 16, 20, 2);
  delay(2000);
  // step motor 4 for 200 increments CCW
  quadstep.motor_go(3, 16, -20, 2);
  delay(2000);

  // holds the motor in one position with full torque/current
  // quadstep.stall(1);
  // delay(500);
}

Debug:
Code:
error: incorrect value for motor_go
error: incorrect value for motor_go
error: incorrect value for motor_go
error: incorrect value for motor_go
error: incorrect value for motor_go
error: incorrect value for motor_go
error: incorrect value for motor_go
error: incorrect value for motor_go
error: incorrect value for motor_go
error: incorrect value for motor_go
11  Using Arduino / Networking, Protocols, and Devices / Re: Xbee Communication - Receiving some strange characters on: April 27, 2014, 03:13:24 am
With this serial port monitor is worse.

the console log is in the link below:
http://pastebin.com/nViwH3mV

My Xbee settings for receiver and transmitter are attached here.
12  Using Arduino / Networking, Protocols, and Devices / Xbee Communication - Receiving some strange characters on: April 26, 2014, 06:29:42 pm
hi there!
i am using 2 xbees for serial communication, one is connected to arduino via wire and transmits data to the other xbee which is connected to a usb explorer breakout and i am reading the data in the xctu console log.
the console log gives me strange characters when i power up the arduino, which means that they are transmitted from the first xbee.
does anyone know why i am receiving these strange characters?
I need to get rid of these characters.

I am using 2x Xbee S1, and the configuration for the Receiver is:
DL Destination Address Low 1
MY 16 bit SOurce Adddress 2

The transmitter configuration is:
DL Destination Address Low 2
MY 16 bit SOurce Adddress 1

All the other values are set to default.

Image attached to see my console log from xctu.
Any help on how to get rid of the strange characters?


transmitter code:
Code:
int counter=0;

// the setup routine runs once when you press reset:
void setup() {
  // declare pin 9 to be an output:
 
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  
 counter=counter+5;
 Serial.print("Counter=");
    Serial.println(counter);
 
 

if (counter==100) {
 counter=0;
}
delay(1);
}

13  Using Arduino / Networking, Protocols, and Devices / Re: Process call using Arduino Yun on: February 18, 2014, 02:35:10 am
Something wrong with my code?
14  Using Arduino / Networking, Protocols, and Devices / Re: Process call using Arduino Yun on: February 17, 2014, 03:11:31 pm
#! /bin/sh
ping -c 1 google1.com > /dev/null 2>&1
status=$?
echo $status
if [ $status -eq "0" ]
then
   # if status = 0 then write 1 inside the file "connectivity" (overwrite)
   echo "1" > connectivity
else
   echo "0" > connectivity
fi
15  Using Arduino / Networking, Protocols, and Devices / Process call using Arduino Yun on: February 17, 2014, 03:26:49 am
Hi there,
I need to run a script file in my linux side through my arduino sketch code.
The file is located in /arduino/ping.sh and it runs through terminal by "/arduino/ping.sh" and works.
But using my sketch it doesn't. Its like I cannot run the script at all.

Please check my code. I am a rookie in linux so I dont know much about it.

Code:
/*
  Running process using Process class.

 This sketch demonstrate how to run linux processes
 using an Arduino Yún.

 created 5 Jun 2013
 by Cristian Maglie

 This example code is in the public domain.

 http://arduino.cc/en/Tutorial/Process

 */

#include <Process.h>

void setup() {
  // Initialize Bridge
  Bridge.begin();

  // Initialize Serial
  Serial.begin(9600);

  // Wait until a Serial Monitor is connected.
  while (!Serial);

  // run various example processes
  runCpuInfo();
}

void loop() {
  // Do nothing here.
}


void runCpuInfo() {
  // Launch "cat /proc/cpuinfo" command (shows info on Atheros CPU)
  // cat is a command line utility that shows the content of a file
  Process p; // Create a process and call it "p"
  p.begin("/arduino/ping.sh"); // Process that launch the "cat" command
  //p.addParameter("/arduino/ping.sh"); // Add the cpuifo file path as parameter to cut
  p.run(); // Run the process and wait for its termination

  // Print command output on the Serial.
  // A process output can be read with the stream methods
  while (p.available() > 0) {
    char c = p.read();
    Serial.print(c);
  }
  // Ensure the last bit of data is sent.
  Serial.flush();
}
Pages: [1] 2 3 ... 12