# Problem with gridpicker/imageliteral

**URL:** https://forum.makecode.com/t/problem-with-gridpicker-imageliteral/2914
**Category:** micro:bit
**Created:** [July 24, 2020, 3:22pm UTC](https://forum.makecode.com/t/problem-with-gridpicker-imageliteral/2914 "2020-07-24T15:22:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![MKleinSB](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/mkleinsb/32/593_2.png) [@MKleinSB](https://forum.makecode.com/u/MKleinSB)
#### Post date: [July 24, 2020, 3:22pm UTC](https://forum.makecode.com/t/problem-with-gridpicker-imageliteral/2914/1 "2020-07-24T15:22:52Z")

</div>

I made a customblock for a row of 12 LEDs on a I2C IOExpander. So I used imageliteral to create a clickable row of 12 LEDs.  
 ![grafik](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/773feab602b94eb2fe3759b13b3513039ebb2d6c.png)

**This runs fine in Simulator** , but **not** on the microbit. With makecode beta on Edge Win10 it generates an error when clicking Download on a paired microbit.

 ![grafik](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/4/44eeeec59afd70241c5316147d193e8fa695100e.png)

> **[test3 klein](https://makecode.microbit.org/70967-50191-27901-46054)**
>
> Erstellt mit ❤️ in Microsoft MakeCode for micro:bit.

```
 //% color=#0fbc11 icon="\uf2db"
 namespace MCP23017 {

//% block="clickLED"
//% imageLiteral=1
//% imageLiteralColumns=12
//% imageLiteralRows=1
//% shim=images::createImage
export function clickLED(i: String): void {
    const im = <Image><any>i;
     im.showImage(0) // shows on LED Matrix for Test       
     im.showImage(5) 
    // im.showImage(10)
    for (let column = 0; column < 12; column++) {
     if (im.pixel(column, 0)) {
        // setLed(column+1,State.High)
        basic.showNumber(column)
    } else {
        //setLed(column+1,State.Low)
        }
   }  
 } 
}

```

@peli: your testprogram [Help with block field editors - large image grid picker?](https://forum.makecode.com/t/help-with-block-field-editors-large-image-grid-picker/1769/2) runs in simulator, too but not on a real micro:bit

Any Idea? Thanks!

Michael
