Loading...
  Show Posts
Pages: [1] 2 3 4
1  Community / Website and Forum / Re: Karma on: January 31, 2011, 09:51:07 am
its a bit too prone to miss-clicking, its good but maybe you should seperate the + and - a bit more.
2  Using Arduino / Programming Questions / Re: using EEPROM on: January 29, 2011, 04:50:57 pm
I would recommend reading a button or something to control when the writes happen so you don't just sit there & pound the living daylights out of that 1 location by accident, they do have limited durability.  As pointed out, you start writing to address 0 whenever the sketch starts - maybe change the sketch to read first, with "a = EEPROM.read(address);", then continue incrementing "a" from there.
Virgin EEPROM  addresses will have 0xFF (255 decimal) when read back.
Keep in mind that EEPROM.write has built in 3.3mS time to complete, which you provide for with 500mS delay. If you capture the time written as part of a loop of doing other stuff, and check that 3.3ms have gone by before starting the next write, you can be doing other stuff while waiting (this is the heart of Blink Without Delay).



that was all I needed to do, the problem is solved thank you very much, and yes I will be using buttons to activate the code in other projects
As just a little side note, thank you to the other two who also posted help and in refference to the second reply, pressding the reset button does not erase the EEPROM variables, they stay exactly the same.

for the benifit of others, here is the working code, I hope it helps in the future:

Code:
#include <EEPROM.h>
int address;
int value;
int a=EEPROM.read(address);

void setup(){
  Serial.begin(9600);
}

void loop(){
   //Lets first write a value to the eeprom
  if ((a==255)){
  a=0;
  }
  EEPROM.write(address,a);
  a++;
  delay(500);
  if(a>100){a=0;}

  //Lets read the value back and print it to the serial
  value = EEPROM.read(address);
    //Output the data to serial
  Serial.print(value,DEC);  // will print 123
  Serial.print("\n");
  //Serial.print(value,BIN);  // will print 1111011 which is 123 in binary
}


Peace out


Chris.
3  Using Arduino / Programming Questions / using EEPROM on: January 29, 2011, 03:56:51 pm
hey all.

ive been reading the EEPROM library and have looked everywhere for examples on how EEPROM works.

here is the code I am using right now:
Code:
#include <EEPROM.h>

int address = 0;
int value;
int a=0;

void setup(){
  Serial.begin(9600);
}

void loop(){
   //Lets first write a value to the eeprom
  EEPROM.write(address,a);
  a++;
  delay(500);
  if(a>100){a=0;}

  //Lets read the value back and print it to the serial
  value = EEPROM.read(address);
    //Output the data to serial
  Serial.print(value,DEC);  // will print 123
  Serial.print("\n");
  //Serial.print(value,BIN);  // will print 1111011 which is 123 in binary
}

Now if I understand EEPROM right,
if i was to reset the arduino at the "a" count of say...53, when it starts up again, it should pick up where it left off.
instead it starts at 0 again.
this is my first ever experience with EEPROM, so I would like to understand the basic of the code before I implement it in my other projects.
cheers in advance for all your help guys.

 smiley

Chris
4  Forum 2005-2010 (read only) / Development / Re: Help- using an arduino to make a midi controller on: January 05, 2011, 10:37:54 pm
suryavoice, dude ill give you a hand with your encoder, and in exchange could i ask for a favor? you see i dont have a KP3 so I can't test the code i wrote for it. but in theory it should work. if you could PM me your encoder code, ill see what I can do, and if its ok ill PM you a message asking you to test a bit of code, (its just the hold function i need testing).

anyway buddy, hope you had a good holiday!

let me know

 ;D ;D ;D ;D ;D
5  Forum 2005-2010 (read only) / Development / Re: Help- using an arduino to make a midi controller on: January 04, 2011, 05:06:55 pm
it was fun, I upgraded the code so that it should work on KP3...sadly i dont have a KP3 to test it with.

I also made it so the LED blinks when settings are being changed, for example when the HUE cycle is being changed or when you choose between the whammy and the KP2.
6  Forum 2005-2010 (read only) / Development / Re: Help- using an arduino to make a midi controller on: December 20, 2010, 05:20:39 am
also, the hold function. I was just reading the owners manual for the KP3, and that has an actual hold command...which is midiCC(0xB0, 95, 127).

but on the KP2 that is MUTE, so im wondering what command you guys used for the hold function. did you use the 92 on/off command?

also my code isnt running as smoothly on the drum machine as I want it to. I have a feeling its because of the constant sending of coordinates, as when I move my finger on the kaoss pad itself, the drum effect changes but remains in rhythm. if i do it on my pad, it doesnt. i think it might just be with sending the touch ON code too many times. but im not sure.

let me know guys.

cheers.
7  Forum 2005-2010 (read only) / Development / Re: Help- using an arduino to make a midi controller on: December 20, 2010, 02:06:20 am
just curious, how have you guys attached the touch pad to the guitar? I.E, have you put a frame around the touch pad? and if so, how did you make it?

I'm not too happy with my frame, so I want to remake it, im just curious for ideas. cheers.
8  Forum 2005-2010 (read only) / Development / Re: Help- using an arduino to make a midi controller on: December 15, 2010, 03:01:09 pm
I wish I could... but I don't have a camera. sorry dude.
9  Forum 2005-2010 (read only) / Development / Re: Help- using an arduino to make a midi controller on: December 13, 2010, 11:17:02 pm
well I did not expect this thread to attract so much attention.

I'm pretty much done now. I've done all the programming, I just have to wedge it all in my guitar.

The touch pad works both on the kaoss pad and the whammy pedal.

encoder works and so does the hold button.

I've made the touch pads light responsive to movement. but along with that, Ive added an extra button which means I can switch the standby light effect. there are about 18 pre-sets in the BlinkM already and I was more then happy to use them.

I am really tempted to put a kit together and put it on sale on ebay. but as I was doing this as something just for me, I wasn't really looking on making a profit. depends how interested people are on this idea.

one of the dudes above was asking about encoders and hold buttons.

Well I got almost all my stuff off ebay, and you can get an encoder that also has a switch on it. thats the one I opted for. as for the buttons to change the lighting effect or the mode of the touch pad(whammy or kaoss pad) I haven't decided yet.

So I shall see.

Guys I'm more then willing to help others with this project, as long as you don't expect me to do it for you.

thankfully no one has expected that so far.

10  Forum 2005-2010 (read only) / Development / Re: Help- using an arduino to make a midi controller on: November 18, 2010, 11:36:20 am
just buy some cloudy acrylic.
11  Forum 2005-2010 (read only) / Development / Re: Help- using an arduino to make a midi controller on: November 15, 2010, 06:05:28 am
its the code I used smiley-wink
12  Forum 2005-2010 (read only) / Development / Re: Help- using an arduino to make a midi controller on: November 15, 2010, 01:05:32 am
it really doesn't matter where you connect the touch pad wires, as you define in the code the numbers you connected it to. I personally used the connecting the 4 wire touch pad to 6 pins, the link is somewhere along this topic, give it a go and let us know if your stuck.
13  Forum 2005-2010 (read only) / Development / Re: Help- using an arduino to make a midi controller on: November 14, 2010, 03:02:09 pm
when I started I also knew nothing, and expected a full how to...I am so glad i wasn't given one.
this post has literally EVERYTHING you need to make the touch pad with.
14  Forum 2005-2010 (read only) / Development / Re: Help- using an arduino to make a midi controller on: November 11, 2010, 06:59:54 am
with the KP3 it should be possible, but KP2 I don't know.
15  Forum 2005-2010 (read only) / Development / Re: Help- using an arduino to make a midi controller on: November 07, 2010, 12:34:25 pm
touch pad is being read, now I just need to think about how im gonna write code that turns off the pad when im no longer touching it, but also doesnt just turn it off after every midi signal is sent, as that sounds crap.
Pages: [1] 2 3 4