Recent Posts

Pages: [1] 2 3 ... 10
1
Here's a better fix than commenting out the one line (which may be useful in some libraries where a scheduler is implemented.) Create a file called hooks.c in the digistump\hardware\avr\1.6.7\cores\tiny directory with the below content. If nothing hooks the yield() function, it's basically a NOP. But if some other library actually does use that hook, it's there and fastled will benefit from its presence.

/*
  Copyright (c) 2012 Arduino.  All right reserved.

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation; either
  version 2.1 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  See the GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

/**
 * Empty yield() hook.
 *
 * This function is intended to be used by library writers to build
 * libraries or sketches that supports cooperative threads.
 *
 * Its defined as a weak symbol and it can be redefined to implement a
 * real cooperative scheduler.
 */
static void __empty() {
   // Empty
}
void yield(void) __attribute__ ((weak, alias("__empty")));
2
Digispark (Original) Support / digispark attiny 85 temperature controlled led
« Last post by nik.evia on March 23, 2017, 05:38:52 pm »
Hello to everyone . I am a very  newbie in this thing so please be patient ..
i want to make a program with digispark attiny 85 a led and an lm 35 . so when the temperature is above a limit the led will turn on and when it is ok led will be turned off.
can u help me with the code and tell me what pins to use because i have been confused???
3
I haven't flashed anything on the Oak recently, but because of the timing, it was probably related to the issues they were having on the 23rd (scroll down to see the past incidents).
4
Digispark (Original) Support / Gamepad digispark
« Last post by lucenacsl on March 23, 2017, 03:23:17 pm »
Hello class,
I'm trying to learn how to use arduino, but I need help. I have a project to use a Digispark, I need the computer to recognize the Digispark as a gamepad, but a simple gamepade with buttons only. Unfortunately I am not yet aware of how to do the sketch and the wiring diagram.
Could someone pass me this sketch and diagram so I can test ??
5
I started to see issues when trying to upload to my Oak today.  Everything worked fine yesterday.

When I try to compile and upload a sketch from the Arduino IDE, it appears to be Flashing, but I eventually get this error "Error : Flash timeout - flash failed."

I initially thought I would have to put the Oak into safe mode and try again, but after 5 minutes, the Oak reset and the new sketch was running!

If I reset the Oak and put it into safe mode, then try the upload the same thing happens.  It looks like the Oak isn't handshaking back to tell the IDE things are upload and ready to reboot.  I'm thinking the Oak put into upload mode will only wait so long until a watchdog timer resets the Oak.

I'm glad my sketch was uploaded and is running, but this is really slowing my development.

Any thoughts how to fix this?
6
Digispark (Original) Support / Re: odd power issue
« Last post by laazarus on March 21, 2017, 02:25:37 am »
I 'd agree that the digispark isn't at fault, getting the power right and it working proves that. The 6v was only part of testing, it's running ok now with the boost converter and a 14500 cell so that will do me. The BOM has gone up a bit but the overall footprint has gone down so that makes the job a bit easier. I've got 3 sets of these to build and another set of the more complex ones before the next trip out in a months time. may investigate the power issue a bit more after that. the digispark is a great little board for these projects so it will be handy to know the limitations and requirements as i'm obviously quite close to the the edge of some thing that it needs to run reliably.
7
Digispark (Original) Support / Re: odd power issue
« Last post by Ralf on March 21, 2017, 01:52:57 am »
Well, the spikes on VCC may be so short that you do not see them on a slow voltmeter.

You could try something different, although I do not think that the DigiSpark causes the problems:

Decouple the DigiSpark's VCC from the batteries by a diode (for example, a 1N4001 (or another from the 1N400x series). Cathode (the side marked with the ring) pointing to the DigiSpark's VCC pin.

When the battery voltage drops, the Diode prevents the 4.7 µF capacitor on the DigiSpark from beeing discarged.

By the way, 6V is a bit too much for the ATTiny. The diode also eats up about 0.5V when it conducts - so the Digispark's VCC pin sees only 5.5V.

8
Digispark (Original) Support / Re: odd power issue
« Last post by laazarus on March 21, 2017, 01:23:31 am »
That makes sense though at this point it shouldn't be an issue. the current test servos are only 5g and have no load on them so current should be minimal (the final project will use 9g servos (if they ever arrive) so here's hoping its still ok with those). When I had the volt meter running there was no significant change in voltage from the boost converter when the servos tried to move, 0.02v at most so never dropped below 5.06v.
I could look at slowing the servos down a bit though this is not ideal and moving only one servo is not an option for the overall effect of the project (animated cat ears, I have friends who work as teachers out in asia who seem to like giving me projects like this. Last set were 2 9g servos per ear with a 5 button hand remote, though they were based round an arduino leonard usb key board and run happily for  a few hours on 4 aaa's)
9
Digispark Projects / Re: Led flasher for ulm aircraft
« Last post by Airmonterosa on March 20, 2017, 08:14:12 am »
yet take advantage of your great willingness for a second project to connect the digispark to a fuel pump that  must be ON when the pressure detected by a pressure-meter  falls below a certain threshold (0.2 atm, that is  1.3 volts) and must be off when the pressure reaches 0.4 atm, that is 1.7 volts.
If any of you were to visit Italy will be my guest !!!!
10
Digispark (Original) Support / Re: odd power issue
« Last post by Ralf on March 20, 2017, 01:38:07 am »
When the servos drive to a new position the motors need a lot of current. This may cause drops in the supply voltage, especially when using standard AA or AAA batteries.

Most analog servos are very sensitive to changes in the suppy voltage. There is a comparator in it - it compares the voltage of its internal potentiometer (which tells the angle the Servo actually has moved to) against the integrated (lenghtended and flattened) steering pulses coming out of the DigiSpark.

When the supply voltage changes, the potentiometer voltage changes, too, but the inegrated voltage from the steering pulses keeps its value. So the comparator circut gets a wrong idea about the Servo's position and it starts to move erratically, causing more voltage drops.

So you could try to increase the capacitor (using serveral in parallel), or to move the servos at different times, and/or program a ramp so that they do not move to the targeted position as fast as they can, but a bit slower, so that the motors need less current .

Ralf
Pages: [1] 2 3 ... 10