Skip to content

Instantly share code, notes, and snippets.

View skrishnakanth's full-sized avatar
🔆
NEVER STOP !!!

Krishnakanth.S skrishnakanth

🔆
NEVER STOP !!!
View GitHub Profile
// [binary-Hex-Octal-dec] conversions
//10101010
#include <stdio.h>
int main()
{
unsigned long int val=10101011;
long int rem=0x00,i=1,out=0;
while(val !=0)
#!/bin/bash
convert $1 logo.bmp
convert logo.bmp +flip -strip -define bmp:subtype=RGB565 bmp2:- > logo_rgb565.bmp
tail -c 25600 logo_rgb565.bmp > logo.bin
rm logo.bmp logo_rgb565.bmp
@skrishnakanth
skrishnakanth / nrf51_flash.sh
Created September 15, 2020 16:30
Script for flashing nRF51822 microcontroller using OpenOCD and STLink v2
#!/bin/bash
openocd -f interface/stlink.cfg -f target/nrf51.cfg -c "init" -c "halt" -c "nrf51 mass_erase" -c "program $1 verify" -c "reset" -c "exit"