# Screenmagic

**URL:** https://forum.makecode.com/t/screenmagic/2268
**Category:** micro:bit
**Created:** [May 30, 2020, 9:30am UTC](https://forum.makecode.com/t/screenmagic/2268 "2020-05-30T09:30:25Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![KeveZeer](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@KeveZeer](https://forum.makecode.com/u/KeveZeer)
#### Post date: [May 30, 2020, 9:30am UTC](https://forum.makecode.com/t/screenmagic/2268/1 "2020-05-30T09:30:25Z")

</div>

namespace screenMagic {

```
/**

 * Plot at LEDs for index

 */

//% blockId="screenmagicplotat"

//% block="Plot At $index"

//% index.min=0 index.max=25

export function plotAt(index: number): void{

    index| 0

    const y = Math.floor(index / 5);

    const x = Math.floor(index % 5);

    led.plot(x, y)

}

```

}

namespace screenMagic {

```
/**

 * Plot toggle LEDs for index

 */

//% blockId="screenmagicplottoggle"

//% block="Plot Toggle $index"

//% index.min=0 index.max=25

export function plotToggle(index: number): void{

    index| 0

    const x = Math.floor(index % 5);

    const y = Math.floor(index / 5);

    led.toggle(x, y)

}

```

}

---

<div class="post-metadata">

### Author: ![DillonB07](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/dillonb07/32/946_2.png) [@DillonB07](https://forum.makecode.com/u/DillonB07)
#### Post date: [June 6, 2020, 11:19am UTC](https://forum.makecode.com/t/screenmagic/2268/2 "2020-06-06T11:19:18Z")

</div>

Is there something wrong with this, or are you just showcasing your code?
