Uploading sketches

Discussion and Support for our Atmospheric Modification Devices.

Moderators: Kent, loss1234

Post Reply
makaton
Common Wiggler
Posts: 100
Joined: Mon Nov 19, 2012 10:43 am

Uploading sketches

Post by makaton » Tue May 06, 2014 12:27 pm

Hi, i seem ot have issue uploading sketches to my ardcore, if i use my mac laptop, it doesnt work, if i use my imac it works, maybe something to do with usb power?

Anyone have simliar issues?

User avatar
AsceticUnderground
Common Wiggler
Posts: 136
Joined: Sun Nov 25, 2012 9:22 pm
Location: London
Contact:

Post by AsceticUnderground » Tue May 06, 2014 12:30 pm

whats the exact error does it give you? works fine for me on a 2010 mac laptop as well as the newest mac mini.

makaton
Common Wiggler
Posts: 100
Joined: Mon Nov 19, 2012 10:43 am

Post by makaton » Wed May 07, 2014 4:56 am

i will try and upload a sketch using laptop and post the output error. I am using same sketch on both computers but does not work on my laptop, its mac 2010 aswell.

makaton
Common Wiggler
Posts: 100
Joined: Mon Nov 19, 2012 10:43 am

Post by makaton » Wed May 07, 2014 4:14 pm

this the error:

Binary sketch size: 1,586 bytes (of a 32,256 byte maximum)
avrdude: stk500_recv(): programmer is not responding


same sketch on imac uploads fine.

makaton
Common Wiggler
Posts: 100
Joined: Mon Nov 19, 2012 10:43 am

Post by makaton » Thu May 08, 2014 3:55 am

btw your phase pattern sketch is great. Is it possible to clock the speed using an external clock source?

User avatar
AsceticUnderground
Common Wiggler
Posts: 136
Joined: Sun Nov 25, 2012 9:22 pm
Location: London
Contact:

Post by AsceticUnderground » Thu May 08, 2014 4:41 am

That looks like it cant 'see' the ardcore. In the arduino software do you have the right board (arduino uno) and serial port selected in the tools menu?

Glad you like that sketch, it was just a bit of fun really so i didnt add external clock, it wouldnt be very hard for you to add it though ;)

makaton
Common Wiggler
Posts: 100
Joined: Mon Nov 19, 2012 10:43 am

Post by makaton » Thu May 08, 2014 5:18 am

I have Uno set as board, the /dev/tty.bluetooth-pda-sync is that correct?

btw re the clock

would adding these lines initiate the clock input?

const int clkIn = 2;

volatile int clkState = LOW;
int clockTick[2] = {1, 1};

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

// set up the digital (clock) input
pinMode(clkIn, INPUT);


void loop()
{
int i;

Serial.print(analogRead(0));
Serial.print('\t');
Serial.print(analogRead(1));
Serial.print('\t');
Serial.print(analogRead(2));
Serial.print('\t');
Serial.println(analogRead(3));

// deal with possible reset
for (i=0; i<2; i++) {
if (analogRead(3) > 511) {
clockTick = (analogRead(i) >> 6) + 1;
}
}

// deal with incoming clock ticks
if (clkState == HIGH) {
clkState = LOW; // reset for the next clock

for (int i=0; i<2; i++) {
clockTick --;
if (clockTick < 1) {
digState = HIGH;
prevMilli = millis();
digitalWrite(digPin, HIGH);

clockTick = (analogRead(i) >> 6) + 1 + (analogRead(2) >> 6);
}
}
}

// deal with trigger turnoff
for (int i=0; i<2; i++) {
if ((digState == HIGH) && ((millis() - prevMilli) > trigTime)) {
digState = LOW;
digitalWrite(digPin[i], LOW);
}
}

}

i have just looked at code for another sketch, using a clock input. ;-)

I am not a coder!

User avatar
AsceticUnderground
Common Wiggler
Posts: 136
Joined: Sun Nov 25, 2012 9:22 pm
Location: London
Contact:

Post by AsceticUnderground » Thu May 08, 2014 5:22 am

"/dev/tty.bluetooth-pda-sync" is incorrect. It should be "dev/tty/usbserial/xxxx" (xxxx is some number), that'll be the issue. Change it to that port and it should upload

Adding a clock is a bit more complicated than that, as you need to override the internal timer, if you dont write code i guess its not that easy to add a clock in :P

makaton
Common Wiggler
Posts: 100
Joined: Mon Nov 19, 2012 10:43 am

Post by makaton » Thu May 08, 2014 8:45 am

I dont see the option for usbserial. also if i do ls /dev/tty.* in terminal i only see bluetooth.

I am on OSX 10.8.5, my imac is still on 10.6, so maybe issue with 10.8 +? i will have a look on google.

User avatar
AsceticUnderground
Common Wiggler
Posts: 136
Joined: Sun Nov 25, 2012 9:22 pm
Location: London
Contact:

Post by AsceticUnderground » Thu May 08, 2014 9:05 am

yeah its definitely not seeing the arduino port on that computer then. Im on Mavericks and it works ok. You might want to try installing the FTDI drivers http://www.ftdichip.com/Drivers/VCP.htm

makaton
Common Wiggler
Posts: 100
Joined: Mon Nov 19, 2012 10:43 am

Post by makaton » Thu May 08, 2014 2:37 pm

Thank You, its working now. i have downloaded drivers and installed. (sure i did this before!)

User avatar
AsceticUnderground
Common Wiggler
Posts: 136
Joined: Sun Nov 25, 2012 9:22 pm
Location: London
Contact:

Post by AsceticUnderground » Fri May 09, 2014 4:16 am

awesome :D glad to be of help

Post Reply

Return to “SNAZZY FX”