I bought another one of those ESCs and it has one pin marked 5V12A
Is that what I want for 5v
Is that what I want for 5v
So what do I do in order to get the DigiSpark working? I want to put the code onto it... Do I add the URL for the DigiSpark into the Arduino web editor?It's misleading. There are a huge number of third-party boards that are compatible. Arduino keeps a list of them here. The URL after the titles are the files that contain the information the IDE needs to install the support files for the board. They show up in the list of boards to select. Below is the Digistump section from the list. A note about the Digispark: you need a driver if you are using Windows but it gets installed during the IDE update; also, unlike most boards, you plug in the board to be programmed after the program has compiled. It prompts you and gives you 60 seconds to do it.
One more thing, this is the preferences dialog where you enter additional board URLs. You can have as many as you like.
http://digistump.com/wiki/digispark/tutorials/connectingSo what do I do in order to get the DigiSpark working? I want to put the code onto it... Do I add the URL for the DigiSpark into the Arduino web editor?
It certainly sounds like it. You could run quite a few thousand Digisparks on 12A.Thank you I will check that out. And is the wire marked 5V12A the correct 5v thing that I need
That's because the code he gave you is for the ATTINY85 not the ATTINY85 on a Digispark.Thanks
I put in the code and it said
exit status 1
'D0' was not declared in this scope
Here's the code KeithWalker gave
// Program an ATTINY85 to set position of servo by position of potentiometer.
// Pot connected to pin A1, servo connected to pin D0
int val;
void setup()
{
pinMode(D0, OUTPUT); //Defines D0 as output for servo
digitalWrite (D0, LOW); // Sets servo output low
}
void loop()
{
val = analogRead(A1); // Reads position of potentiometer
val = map(val, 0, 1023, 1000, 2000); //Scales the input range to pulse length values (uS)
digitalWrite (D0, HIGH); // Generates a positive output pulse
delayMicroseconds (val);
digitalWrite (D0, LOW);
delay (16); // Sets the frame rate
}
So it appears that the definition of the Digispark development board does not include D0. D0 is a reserved word. It IS defined for the Arduino boards.Thanks
I put in the code and it said
exit status 1
'D0' was not declared in this scope
Here's the code KeithWalker gave
// Program an ATTINY85 to set position of servo by position of potentiometer.
// Pot connected to pin A1, servo connected to pin D0
int val;
void setup()
{
pinMode(D0, OUTPUT); //Defines D0 as output for servo
digitalWrite (D0, LOW); // Sets servo output low
}
void loop()
{
val = analogRead(A1); // Reads position of potentiometer
val = map(val, 0, 1023, 1000, 2000); //Scales the input range to pulse length values (uS)
digitalWrite (D0, HIGH); // Generates a positive output pulse
delayMicroseconds (val);
digitalWrite (D0, LOW);
delay (16); // Sets the frame rate
}
Missed it by this much.That's because the code he gave you is for the ATTINY85 not the ATTINY85 on a Digispark.
The program has to be adapted to match the pins on the board. Here is a diagram:
The numbers are the literal pin numbers but you can use the PBn numbers. Use PB1 in instead of D0 and PB2 instead of A1. Connect to the corresponding pins, they are marked on the bottom of the board.
You'd will al
Did you install the drivers?Thank you
I changed it in the code and hit upload. It told me to plug in the device and when I did, the computer kept giving the plug in and unplug noises over and over and Arduino never recognized the DigiSpark.
Thank you
The dotted arrow is the axis of motion that will be measure. The stick moving within rather than against, the white plastic slot.Thank you
I don't get it. What does it mean the arrow thing that you wrote
And I see the 5V pin...The middle one is labeled PIN. Is the middle one the signal output, and the unlabeled pin is the ground?
ThanksThe dotted arrow is the axis of motion that will be measure. The stick moving within rather than against, the white plastic slot.
The unused pin is unused. The potentiometer is a variable resistor, it will be varying the voltage that appears on the analog pin. 5V in on the first pin, varying voltage out on the middle pin. The third pin is the other end of the resistor inside and we don't care about it.
Look here: https://fddrsn.net/pcomp/examples/potentiometers.html
Page 4 of what?Thanks
It shows in the wiring diagram on page 4 the ground on the ESCs and the ground on the DigiSpark both being connected to ground on the joystick
Sorry page four of this threadPage 4 of what?
Yes, sorry, the third pin on the potentiometer to ground (OV) to make a voltage divider.Sorry page four of this thread