Show Posts
Pages: [1] 2 3
1  Community / Gigs and Collaborations / Re: MIDI and DMX on: August 24, 2014, 06:38:10 am
Ah, just realized you want to pay someone to make them for you. Ok...
2  Community / Gigs and Collaborations / Re: MIDI and DMX on: August 24, 2014, 06:33:31 am
Hi,

Sounds great to make sure you're always in the spotlight when playing a solo smiley

I would check what kind of message your midi pedal board/amp is sending when you push your 'solo' button, and also when you push your other buttons (assuming you'd like to turn the light off when done guitarsoloing). Theres 'midi monitor' for mac at least. Goolge it. This is to make sure you can get a genuine message to turn your light on and a genuine (different) one to turn it off.

Then you'd like to make something like this: http://theaudiostash.wordpress.com/2013/05/09/midi-input-for-arduino/ and attach a relay switch instead of the led light. On the relay you can attach a powersocket so that you can plug the lamp straight in to it, avoiding any DMX. That's my suggestion at least.

It might be a bit on the harder side to start with if you're completely new to Arduino, especially if you have no programming experience, but don't let that discourage you. It's a lot easier to learn if you have a project with a goal, like this. So make some research, go through some tutorials for the basics and see how far you get, then get back here with questions if you got them.

(also, I checked the Obey4 - it doesn't have a midi input.. how did you "test it" then?)

Good luck!
G
3  Using Arduino / Audio / Re: Strange problems using SD Card and VS1003B based board on: August 24, 2014, 05:56:40 am
Hi Smultron,

I'm curious - did you find out about this or dd you change your project to a proximity activated mp3 player   smiley-wink

I've got one coming in the post next week..

Best,
G
4  Using Arduino / Networking, Protocols, and Devices / Re: problem receiving OSC (Oscuino + UIP ethernet ) on: June 22, 2014, 07:14:07 am
Happy to hear it worked out  and good news that the ENC28J60 and OSCuino play well together smiley
5  Using Arduino / Networking, Protocols, and Devices / Re: problem receiving OSC (Oscuino + UIP ethernet ) on: June 19, 2014, 04:36:51 pm
Hi,

what are the messages you are sending like? I've no experience with the OSCuino lib, but unless you're sending some very complex stuff it can be done using UDP.

Tell more about what your trying to achieve and include your full code.

cheers
6  Using Arduino / Networking, Protocols, and Devices / Re: Ethercard and Servo wobble strangeness on: June 06, 2014, 12:12:28 pm
After more research I started to suspect that the Ethercard library was using the same timer as the Servo library so I tried the ServoTimer2 library which uses a different timer, but the twitch was still there.

Then I tried the UIPEthernet library and the problem was not there.  So this is for sure something with the Ethercard lib.

I have a problem with dropouts, latency and loosing connection with the UIPEthernet lib, so I would much prefer to use Ethercard. Anyone know where to go from here?
7  Using Arduino / Networking, Protocols, and Devices / Re: Ethercard and Servo wobble strangeness on: June 06, 2014, 05:37:07 am
I have now boiled down the code to the only necessary parts, and only one servo:

Code:
#include <EtherCard.h>
#include <IPAddress.h>
#include <Servo.h>

static byte myip[] = { 172,16,1,153 };
static byte mymac[] = { 0x70,0x69,0x69,0x2D,0x30,0x04 };
// gateway ip
static byte gwip[] = { 172,16,1,2 };

byte Ethernet::buffer[500]; // tcp/ip send and receive buffer

Servo Servo1;

//callback that prints received packets to the serial port
void udpSerialPrint(word port, byte ip[4], const char *data, word len) {

}

void setup(){
  ether.begin(sizeof Ethernet::buffer, mymac, 10);
  ether.staticSetup(myip, gwip);
  //register udpSerialPrint() to port 8888
  ether.udpServerListenOnPort(&udpSerialPrint, 8888);
  
  Servo1.attach(3);  // Servo 1 on pin 3
  Servo1.write(62);

}

void loop(){
  //this must be called for ethercard functions to work.
  ether.packetLoop(ether.packetReceive());
}

- The servo twitches when sending any values to the ip address.
- When set to of these values (7, 18, 26, 37, 54, 62, 68, 73, 81, 92, 103, 111, 117, 122, 147, 153, 158, 166) the servo will stay twitching even when not receiving any packets over UDP. On other values it remains still unless I send it any values.

Edit: and still if I comment out
ether.packetLoop(ether.packetReceive());
in void loop(), the twitching stops.

After reading this topic http://forum.arduino.cc/index.php?topic=235765.0 it seems probable that the Ethercard library is obstructing the Servo lib from updating the servo, or that there is a fault in the Servo library.

Any ideas? Am I asking in the right forum?

cheers,
g
8  Using Arduino / Networking, Protocols, and Devices / Re: Ethercard and Servo wobble strangeness on: June 04, 2014, 10:15:09 am
Hi Paul,

hm, you suggested using atoi in this context in this thread http://forum.arduino.cc/index.php?topic=235019.msg1691170#msg1691170.
My knowledge on this is limited, what should I use to process the incoming UPD packet instead of atoi? Do you think that this could be the problem?
9  Using Arduino / Networking, Protocols, and Devices / Re: Ethercard and Servo wobble strangeness on: June 04, 2014, 08:06:47 am
The comment should say
// This part pisses away resources unnecessarily

Haha! Thanks, I made the change (to the code, not the comment smiley-wink), but it did not change the behavior though :/
10  Using Arduino / Networking, Protocols, and Devices / Re: Ethercard and Servo wobble strangeness on: June 04, 2014, 07:26:03 am
How are you supplying power to the servos?
Hi Ray,

With the Pro Mini I power them from a 5v, 1A power supply, which also powers the Pro Mini. The issue is still there when only one servo is connected. I have measured the ampere pull and it is sufficient.

With the Uno I power just one servo from the 5v pin on the board.

11  Using Arduino / Networking, Protocols, and Devices / Ethercard and Servo wobble strangeness on: June 04, 2014, 06:49:58 am
Hi all,

I've got 4 servos hooked up to my Uno and a ENC28J60 ethernet module, sending messages to the servos over UDP, and I am getting some strange twitching of the servos, at different intervals, when they are not receiving any values. Here is a video of one of them http://tinypic.com/r/zb7yv/8 (bit out of focus, but you hear it at least). The twitching also often happens if I send messages to other servos...!

I have boiled it down to being a problem with the code or Ethercard/Servo library (see below for the things I have ruled out as being the issue).

When I comment out:
ether.packetLoop(ether.packetReceive());
in void loop() the problem disappears, but it also does not read any UDP packets anymore.

Also, strangely, when I comment out some of the servos, to leave me with just two, the twitching is reduced, but not gone, and it increases with more servos added in the code.

Code:

#include <EtherCard.h>
#include <IPAddress.h>
#include <Servo.h>

// ethernet interface ip address
static byte myip[] = { 172,16,1,152 };
// gateway ip address
static byte gwip[] = { 172,16,1,2 };
// mac
static byte mymac[] = { 0x70,0x69,0x69,0x2D,0x30,0x03 };

byte Ethernet::buffer[500]; // send and receive buffer

// initialization of the servos - pin 10 is used by the Ethernetshield
Servo Servo1;  // Servo 1 on pin 3
Servo Servo2;  // Servo 2 on Pin 4 
Servo Servo3;  // Servo 3 on Pin 5
Servo Servo4;  // Servo 4 on Pin 6


//callback that prints received packets to the serial port
void udpSerialPrint(word port, byte ip[4], const char *data, word len) {
 
  char command[4];      // commandstring
  unsigned int vnumber; // the value as integer
 
  if (len > 0) {
       
          command[0]=data[0];
          command[1]=data[1];
          command[2]=data[2];
          command[3]='\0';
         
          vnumber = atoi(&data[3]); // convert to integer
   
    // this part converts the command to hardware
    if (String(command) == "SR1")
    {
      Servo1.write(vnumber);
    }

    if (String(command) == "SR2")
    {
      Servo2.write(vnumber);
    }

    if (String(command) == "SR3")
    {
      Servo3.write(vnumber);
    }
   
    if (String(command) == "SR4")
    {
      Servo4.write(vnumber);
    }

  }
}

void setup(){
  Serial.begin(9600);
  Serial.println("\n[backSoon]");

  if (ether.begin(sizeof Ethernet::buffer, mymac, 10) == 0)
    {Serial.println( "Failed to access Ethernet controller"); };

  Serial.println("ether begin ok");

  ether.staticSetup(myip, gwip);

  Serial.println("static ip set");

  //register udpSerialPrint() to port 8888
  ether.udpServerListenOnPort(&udpSerialPrint, 8888);
 
  Servo1.attach(3);  // Servo 1 on pin 3
  Servo2.attach(4);  // Servo 2 on Pin 4
  Servo3.attach(5);  // Servo 3 on Pin 5
  Servo4.attach(6);  // Servo 4 on Pin 6
  Servo1.write(65);
  Servo2.write(65);
  Servo3.write(65);
  Servo4.write(65);

  Serial.println("setup ok");
}

void loop(){
  //this must be called for ethercard functions to work.
  ether.packetLoop(ether.packetReceive());
}



Other things I have tried:
- using different servos (so it's not the servo)
- using a pro mini board (so it's not the uno board)
- different ENC28J60 modules (so it's not the module)
- powering from a 9v power adapter
- powering from USB only from the laptop running on batteries (so it's not unstable current or something)
- using the servos with plain example code for servos.

Any insight or tips of other things I can try to pinpoint this is greatly appreciated! I am hoping something is obvious in my code, as I'm not a very experienced coder...

Cheers!
12  Using Arduino / Project Guidance / Re: Battery advice for my project on: May 07, 2014, 04:18:57 pm
Quote
- one charge should last
how long?
hah, dont know how that disappeared.. 2 hours at least

Thanks for the suggestions! It's true, I'm not sure where to look.

Can I use all these batteries even when they are charging? And can they stay in the charger safely for a long time?
13  Using Arduino / Project Guidance / Battery advice for my project on: May 07, 2014, 02:18:01 pm
Hi all,

I need to power my project with batteries, and the different modules needs different voltages:
- arduino uno with wifi board 5v pulls ~ 160mA
- servos 5v pulls ~ 800mA
- amplifier 6...16v (i want to use as much voltage as i can, within limits..) ~ 300mA
- radio receiver 3v pulls ~ 150mA
overall ~ 1600mA

These are my goals:
- I want to be able to recharge it "like a laptop", so that it can run while it is charging (like it's in a docking station).
- size and weight is important, should not be much bigger than a fist, not more than 1kg, as this will be a semi portable "robot".
- safety is an issue, that is, I'd best avoid batteries that explode and such  smiley-wink
- one charge should last 2 hours at the least

What would be a good approach to this? Lipo? Nimh? Charger? A good way to regulate the voltage?

(I've looked a bit into lipo batteries, but I cant find any over 3.7v that have a protection circuit.. and the voltage seem to stop at 7.4v..)

thanks for any hints or suggestions!
14  Using Arduino / Programming Questions / Re: get a integer from char* ...? on: April 30, 2014, 07:43:14 am
I ended up using a different library, but now it works smoothly. The finished code is here:
http://forum.arduino.cc/index.php?topic=178024.msg1702783#msg1702783

Thanks for your help all of you!
15  Using Arduino / Networking, Protocols, and Devices / Re: new library UIPEthernet: uIP adapted to Arduino for ENC28J60 on: April 30, 2014, 07:31:20 am
So, to answer myself  -

I redid the code with the Ethercard library and now it's working smoothly, no dropped UDP packages so far.

I was worried that it might have been the ENC28J60 or the cheap fake 4 euro "arduino pro mini" I'd gotted over ebay that was causing the dropouts, but no! So now I'm really happy that I have a fully working 7 euro ethernet arduino smiley-grin

Here's the code in case anyone else is in the same situation:
(but beware, its using the Ethercard lib)

Code:
// Modified from the Ethercard udpServer example
// This code takes simple strings like SR145 where SR1 means "servo 1" and 45 is the value
// I use pin 10 for CS from the ENC28J60. Pin 8 is default in the Ethercard library. This has to be defined in ether.begin


#include <EtherCard.h>
#include <IPAddress.h>
#include <Servo.h>        // Servo library

// ethernet interface ip address
static byte myip[] = { 172,16,3,10 };
// gateway ip address
static byte gwip[] = { 172,16,3,17 };


// ethernet mac address - must be unique on your network
static byte mymac[] = { 0x70,0x69,0x69,0x2D,0x30,0x05 };

byte Ethernet::buffer[500]; // tcp/ip send and receive buffer

// Servo init
Servo Servo1;  // Servo 1 on pin 7
Servo Servo2;  // Servo 2 on Pin 6 



//callback that prints received packets to the serial port
void udpSerialPrint(word port, byte ip[4], const char *data, word len) {
 
  char command[4];      // commandstring
  unsigned int vnumber; // the value as integer
 
  //IPAddress src(ip[0], ip[1], ip[2], ip[3]);
  //Serial.println(src);
  //Serial.println(port);
  //Serial.println(data);
  //Serial.println(len);
 
  if (len > 0) {
   
        //Serial.print("received: ");
        Serial.println(data); // print all received data
       
          // store SR1 in command
          command[0]=data[0];
          command[1]=data[1];
          command[2]=data[2];
          command[3]='\0';
         
          // store value here
          vnumber = atoi(&data[3]); // convert to integer
   
        //Serial.print("command: ");
        //Serial.println(command);
        //Serial.print("value: ");
        //Serial.println(vnumber);
   
    // write to the servos
    if (String(command) == "SR1")
    {
      Servo1.write(vnumber);
      Serial.println("servo 1 go!");
    }

    if (String(command) == "SR2")
    {
      Servo2.write(vnumber);
    }

  }
}

void setup(){
  Serial.begin(9600);
  Serial.println("\n[backSoon]");

  if (ether.begin(sizeof Ethernet::buffer, mymac, 10) == 0) // the 10 because I use pin 10 for CS, not 8 as is default in Ethercard
    {Serial.println( "Failed to access Ethernet controller"); };

  Serial.println("ether begin ok");

  ether.staticSetup(myip, gwip);

  Serial.println("static ip set");
  //ether.printIp("IP:  ", ether.myip);
  //ether.printIp("GW:  ", ether.gwip);
  //ether.printIp("DNS: ", ether.dnsip);

  //register udpSerialPrint() to port 8888
  ether.udpServerListenOnPort(&udpSerialPrint, 8888);
 
  Servo1.attach(7);  // Servo 1 on pin 7
  Servo2.attach(6);  // Servo 2 on Pin 6
  Serial.println("setup ok");
}

void loop(){
  //this must be called for ethercard functions to work.
  ether.packetLoop(ether.packetReceive());
}


Pages: [1] 2 3