all years
202620242023202220212020201920182017201620152014
2211152313307215210213462
1 / 8 older

K.I.T.T. - KNIGHT RIDER badge/brooch | 0805 are coming to tindie in 2018

2017-12-29 22:03:08

also, new firmware :) I've somehow managed to add 5 animations and a switch button to toggle between them! all still fits into the attiny13a.

sloth badge | ahhh... I need help, I don't see it

2017-12-09 23:53:17

Somewhere along I had it go to sleep just fine, but it didn't wake up. Now it wakes up fine, but doesn't want to go to sleep. Seems like I don't have the millis stuff right anymore, I don't get to where the comment "// HOW DO I GET HERE?" is. Too tired to see it, gonna go to bed.

#include <avr/sleep.h>

boolean leds_on = true;

unsigned long previousMillis = 0;
unsigned long currentMillis = 0;
const long interval = 1000;

ISR(INT0_vect) {
  sleep_disable();
  leds_on = true;
}

void setup() {
  // put your setup code here, to run once:
  PORTB |= (1 << PB1); // input
  DDRB &= ~(1<<PB1);

  shutdown_chip();
}

void loop() {
  
  
  if (leds_on)
  {
    cli();
    leds_on = false;
  }

  currentMillis = millis();
  if ( !(PINB & (1 << PB1)) )
  {
    charlie(3);
    
    if (currentMillis - previousMillis >= interval)
    {
      // HOW DO I GET HERE?
      charlie(5);
      delay(2000);
      shutdown_chip();
    }
    else
    {
      charlie(2);
    }
  }
  else
  {
    animate_leds();
    previousMillis = currentMillis;
  }
}

void shutdown_chip()
{
  leds_off();

  /* Clear WDRF in MCUSR */
  MCUSR &= ~(1 << WDRF);
  /* Write logical one to WDCE and WDE */
  /* Keep old prescaler setting to prevent unintentional time-out */
  WDTCR |= (1 << WDCE) | (1 << WDE);
  /* Turn off WDT */
  WDTCR = 0x00;

  ADCSRA &= ~(1 << ADEN); // turn off adc

  GIMSK |= (1 << INT0);
  GIMSK |= (1 << PCIE);

  set_sleep_mode(SLEEP_MODE_PWR_DOWN);
  sleep_enable();
  sei(); // Enable global interrupts
  sleep_cpu();
  sleep_disable();
}

void animate_leds()
{
  for (int i = 0; i < 12; i++) {
    charlie(i);
    delay(50);
  }
  for (int i = 0; i < 12; i++) {
    charlie(11 - i);
    delay(50);
  }
}

void leds_off()
{
  DDRB &= ~(
            (1 << PB0) |
            (1 << PB2) |
            (1 << PB3) |
            (1 << PB4)
          );
  PORTB &= ~(
             (1 << PB0) |
             (1 << PB2) |
             (1 << PB3) |
             (1 << PB4)
           );
}

void charlie (int var) {
  leds_off();

  switch (var) {
    case 0: // 1
      DDRB |= (1 << PB0) | (1 << PB2); // output
      PORTB |= (1 << PB0); // HIGH
      PORTB &= ~(1 << PB2); // LOW
      break;
    case 1: // 2
      DDRB |= (1 << PB0) | (1 << PB2); // output
      PORTB |= (1 << PB2); // HIGH
      PORTB &= ~(1 << PB0); // LOW
      break;
    case 2: // 3
      DDRB |= (1 << PB2) | (1 << PB3); // output
      PORTB |= (1 << PB2); // HIGH
      PORTB &= ~(1 << PB3); // LOW
      break;
    case 3: // 4
      DDRB |= (1 << PB2) | (1 << PB3); // output
      PORTB |= (1 << PB3); // HIGH
      PORTB &= ~(1 << PB2); // LOW
      break;
    case 4: // 5
      DDRB |= (1 << PB3) | (1 << PB4); // output
      PORTB |= (1 << PB3); // HIGH
      PORTB &= ~(1 << PB4); // LOW
      break;
    case 5: // 6
      DDRB |= (1 << PB3) | (1 << PB4); // output
      PORTB |= (1 << PB4); // HIGH
      PORTB &= ~(1 << PB3); // LOW
      break;
    case 6: // 7
      DDRB |= (1 << PB0) | (1 << PB3); // output
      PORTB |= (1 << PB0); // HIGH
      PORTB &= ~(1 << PB3); // LOW
      break;
    case 7: // 8
      DDRB |= (1 << PB0) | (1 << PB3); // output
      PORTB |= (1 << PB3); // HIGH
      PORTB &= ~(1 << PB0); // LOW
      break;
    case 8: // 9
      DDRB |= (1 << PB2) | (1 << PB4); // output
      PORTB |= (1 << PB2); // HIGH
      PORTB &= ~(1 << PB4); // LOW
      break;
    case 9: // 10
      DDRB |= (1 << PB2) | (1 << PB4); // output
      PORTB |= (1 << PB4); // HIGH
      PORTB &= ~(1 << PB2); // LOW
      break;
    case 10: // 11
      DDRB |= (1 << PB0) | (1 << PB4); // output
      PORTB |= (1 << PB0); // HIGH
      PORTB &= ~(1 << PB4); // LOW
      break;
    case 11: // 12
      DDRB |= (1 << PB0) | (1 << PB4); // output
      PORTB |= (1 << PB4); // HIGH
      PORTB &= ~(1 << PB0); // LOW
      break;
    default:
      ;
  }
}

link drop for modding/repairing/hacking stuff | mini maker faire haul

2017-12-03 15:03:11

http://www.analog.com/media/en/technical-documentation/data-sheets/ADE7755.pdf

I bought two of these totally hackable current meters: https://www.conrad.de/de/energiekosten-messgeraet-basetech-em-2000-integrierte-kindersicherung-1302517.html at the mini maker faire in Berlin that is this weekend, heavily sponsored by Conrad Electronics. Probably the best about the whole mini maker faire :D @al1 was there too, so that was nice :) We laughed about the whole "wanting to be a big event" feeling, sadly there weren't many visitors around. We've met some cool people though and talked a bit and got two or three ideas for new projects. There was also no lottery to win a DJI spark. That would have been cool, without much competition. 

LAMEBOY - another ESP12 handheld | kits

2017-12-01 16:23:33

I'm slowly starting to buy parts for 12 kits. I have a list of people who are interested already and will contact them, once I have everything. It takes me longer than I would have wanted, some financial mishaps are forcing me to not spend money on that. Instead I started selling stuff on tindie, to get some money in again. I've been to a hospital in America, everything is alright, but I had to pay 3 bills upfront before I get all the money back from my insurance. This also is under control, just sucks to watch out not spending too much on stuff.

[UPDATE] seems like I only need 100 Ohm and 150 Ohm resistor arrays, but sadly I had no luck so far getting them in Germany. Only on aliexpress I found some and they usually take a long time to arrive here. No luck on eBay. Also I'm not sure I really need resistors on the green and blue LEDs anyway, since their forwarding voltage is 3.3V at 20mA. 

[UPDATE] Thanks to my recent work on #ESP8266 RFid reader I've noticed that the regulator needs to be pulled low, you can't just let it float - which makes perfect sense thinking about it. So that needs to be botched with every version now, but the files are updated. For kitting things up, I need to make sure that everyone is clear on what is what and where to put it. It's complicated and frustrating for sure, hope to make it easy enough though, since selling finished ones seems not an option atm. - German laws... always complicating stuff ;) 

This is probably worth watching :)

K.I.T.T. - KNIGHT RIDER badge/brooch | added 0603 kits to tindie

2017-11-30 21:00:13

what the title says ;) https://www.tindie.com/products/davedarko/kitt-knight-rider-blinky-led-badge/

sloth badge | bearables power consumption

2017-11-30 15:32:19

seems like they use 1.1mA in sleep mode, which isn't really good for a coin cell that has around 230mAh of power - 9 days of doing nothing o.O so with the right settings my sloth badge will already last a lot longer! nice :3

K.I.T.T. - KNIGHT RIDER badge/brooch | Sunday is fun day :)

2017-11-19 13:54:12

had some fun with my cell phone, a ukulele and a soldered badge in the wild :)

K.I.T.T. - KNIGHT RIDER badge/brooch | Knight Rider sweat shop

2017-11-18 14:39:49

Oh help me Michael Knight! So this started yesterday and I just finished a box of 20 "badges" (gotta be careful around here what to call badge and what not). Some conclusions for the next badge, if I ever tend to be so crazy:

I stole the idea of processing from tymkrs.com where they put together 10 badges at a time with the help of a lazy Susan. Pretty cool idea and it worked great (unless I forgot I can rotate the assembly line). 

So 7 hours of production and I was able to take this picture: 

Now I'm off to @Tindie and see that I can put up a store etc. I don't have 0603 resistors for kits yet, once they're here I will put up kits as well. Any tindie tips?

LAMEBOY - another ESP12 handheld | finding the right connector for I2C

2017-11-17 11:34:05

The whole reason I'm looking for something else: I wrote seeed studio about getting the SMT version of the grove connector and they told me that they're sold out / not in stock anymore. I tried a JST 2mm 4 pin connector, but it's just a pain to connect. To be continued, but please, feel free to comment ideas. I need to find a connector that is: 


USB

there's already a usb port on the LAMEBOY and I don't want people to mixup stuff


TRRS 

would be nice, but I don't want to short stuff by accident or have users mistake it for the headphone plug - especially if there's no audio on board. 


RJ12 / RJ25 / RJ10

that was actually already proposed to me in a twitter comment () use the same stuff that LEGO, http://wiki.makeblock.cc/index.php?title=RJ25_Wiring_System and probably others. So right now I'm leaning towards RJ10, a 4P4C cinnector, that is also used to connect phones to the speaker+mic part.


MOLEX / 2.54mm connectors

Down in the comments Molex adapters and CD rom cables (basically 2.54mm headers) were suggested, I like the hacker-ready approach, but it doesn't feel like a "finished" design that I want to achieve with revision 4. The current boards have the grove connector still on them.


Sparkfun QUIIC connectors

@Patrick Van Oosterwijck suggested https://www.sparkfun.com/products/14417 sparkfuns QUIIC connectors, 1mm JST connectors - a wee bit too tiny and the same problems as bigger JST connectors. BUt it features a lot of sensors that one could use.


Spring connectors

another suggestion from twitter, use spring connectors. interesting, easily plug and play ready and probably accepts pcbs, if done right. using pcbs as connectors is the cheapest thing I can think of :D https://t.co/taDxle3lOT

I2C peripherals based on Attiny85 (mostly) | aisler boards are here

2017-11-14 22:47:38

Boards are here and although they have some mouse bites, they do fit nicely :) Already soldered one up and it works nicely! Now I only need to write an 8 player game to fully make use of them :D

LAMEBOY - another ESP12 handheld | woah - updating from SPIFFS

2017-11-14 21:15:29

So I had the Ghost "game" on my lameboy, put the hudy/ninja puzzle game binary that I've exported from arduino into the spiff and was able to update my lameboy firmware from the spiff. So that's a start and could be incorporated into every game / app via a library of some sorts. Some kind of menu could help you go through the SD card, load firmware into spiff and then update the whole thing. Now I'm fiddling with switching images etc.

Got it working, I can now switch between a menu image and a game image. Woot :) With that my sketch size is limited to half a megabyte (or a bit less), since it's working like the ArduinoOTA library. It reads stuff into the 2nd half of the active 1MB flash and after restart the eBoot bootloader overwrites the firmware. Since this is supposed to be working with Arduino (not just because of me :D) so that people can easily work with it, I just need to take that as a given. There's probably a way to work with rboot, but I'd rather cross that bridge only when I come to it. Cool. Cool, cool, cool.

One quirk: I had to remove SD card support, since it also defined a File. I need to take a look into that later. It probably makes sense to have a menu that allows for upgrading / updating from the SD card. I need both libraries If I want to get out of the games that also use the SD card as well. 

Recently I've started a revision 3.2 that turned into a 5.0 revision - in other words it escalated quickly. In the end I had the game boy pocket buttons integrated, changed the CH340G to a CN2102 serial converter, removed the RST and C buttons, moved the I2C port and changed the footprint, changed the footprint of the PCF8574 to a smaller one. Ah, and I ALSO RIPPED UP ALL THE WIRES :D so in the end I closed eagle and called it a waste of time, but didn't delete it. Only 124 airwires, nothing a long weekend can't fix ;)  

http://www.esp8266.com/viewtopic.php?f=32&t=11324
http://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#flash-layout 

http://arduino-esp8266.readthedocs.io/en/latest/filesystem.html#uploading-files-to-file-system

my hack(s) of the day

2017-11-06 20:48:18

https://www.instagram.com/p/BbKT75oHoso/ I didn't want to buy another module that's more "fitting", and I noticed that this might just work, and it did :)

Also this :)


LAMEBOY - another ESP12 handheld | external gamepad

2017-11-03 08:13:18

I thought about recycling Game Boy Pocket buttons and silicone pads for the Lameboy, but didn't want to redesign the boards just yet (again). So I thought about a little gimmick: why not make a testboard for a little external controller for multiplayer stuff :D it's read out over I2C (with another PCF8574 on it). There's also a race, I've ordered the boards at oshpark and aisler to compare times. I hope every hole is matching the printed things.

LAMEBOY - another ESP12 handheld | teardown of bittboy

2017-11-02 12:30:02

CL783a#4 marking on the lcd plastic case

LJ41-05418A UF24U182A REV0.4

S29GL256P11TAI02

SPANSION 

http://www.farnell.com/datasheets/1716956.pdf

256Mbit (32Mbyte) flash chip under the display

LAMEBOY - another ESP12 handheld | fixing rev2 board bug

2017-10-30 23:02:09

so far I only know of @zakqwy ho ordered boards from that rev, but if there's anybody else out there, here's how to fix it, just connect the pads marked with an arrow with a bodge wire. 

LAMEBOY - another ESP12 handheld | sunday inspiration

2017-10-30 01:06:10

Played around with tiles and creating characters today. monochrome 8x8 characters are hard, but I found some cool designs from pico-8. Pretty neat stuff.

LAMEBOY - another ESP12 handheld | working on game mechanics

2017-10-28 23:51:29

I wanted to try out different techniques and tried to replicate the "experience" of the Game of the last log. I got away with a 320x320 pixel tile. The drawBitmap function of the display library seems to do something right :) so no tile engine seems to be needed, but I'm interested to see how @Radomir Dopieralski is doing it over at https://hackaday.io/project/27629-game/log/69791-inside-a-tile-engine 

LAMEBOY - another ESP12 handheld | found a cute game

2017-10-28 12:51:14

I haven't seen this before, it's an orthographic "3D" version of pac man on a ZX81. This might just fit perfectly on the LCD! (anyone who wants to program that? :D)  


One Little Ghost (2012)

Game can be found here, programmed for the ZX81

http://bobs-stuff.co.uk/zx81.html 

Discussion on a sinclair board

http://www.sinclairzxworld.com/viewtopic.php?t=1044


And here's a little mockup for the nokia LCD version (converted with http://www.digole.com/tools/PicturetoC_Hex_converter.php)


any ideas are welcome, if you can think of an interesting game that might work on a monochrome display, please comment. Nokias Space Impact would be cool to have too.

LAMEBOY - another ESP12 handheld | SSD1327 grayscale display board

2017-10-28 01:43:39

So the SSD1327 grayscale display that I found on aliexpress.com is parallel only (8080 protocol). The chip itself is able to talk I2C and SPI as well, but the protocol select pins aren't broken out on the cable. Since I've ordered a display before I realized that and now that aisler has free shipping I designed a breakout anyway. Also on the board: a 15V step-up converter based on the MT3608 - that converter you get when you search for "12V step up" on eBay and sort by "price+shipping lowest first". Plus my new logo design :) I need a different micro controller for that.

I2C peripherals based on Attiny85 (mostly) | starting point for I2C sound card

2017-10-26 23:43:14

After posting, let me quickly remove the SID part and hope no one ever saw it :D Here are some basic samples that are pretty promising, 4 triangle voices on one input, hopefully combinable with I2C. Sounds nice :)

http://www.technoblogy.com/show?QVN

http://www.technoblogy.com/show?Q7H

http://www.technoblogy.com/show?1G29

1 / 8 older