Skip to content

Instantly share code, notes, and snippets.

View arifbalik's full-sized avatar

Arif Balik arifbalik

  • ENDA Automation
  • Istanbul, Turkey
View GitHub Profile
@arifbalik
arifbalik / yocto-nebula.md
Last active March 20, 2024 11:57
Nebula Yocto Recipe

Nebula Yocto Recipe

Tested on Yocto Mickledore

LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=1adddd85956b2419aec1dfcec7139f0d"

SRC_URI = "git://github.com/slackhq/nebula.git;protocol=https;branch=master"
PV = "1.0.0+1.1+git${SRCPV}"
SRCREV = "1f1d6602001477450606e3727dd3788516105e3a"
@arifbalik
arifbalik / .clang-format
Created December 26, 2023 11:24
A Better ENDA C Clang Format File
# Copyright (c) 2023 ENDA
# All rights reserved.
#
# This software and associated documentation files (the "Software") are
# the proprietary and confidential information of ENDA, including any
# accompanying written materials, and may not be disclosed to third parties
# or copied or duplicated in any form, in whole or in part, without the prior
# written consent of ENDA.
---
@arifbalik
arifbalik / enda_naming_convention.md
Last active September 4, 2023 19:36
ENDA C Language Naming Convention Guide

ENDA Embedded C Naming Convention Guide

In the world of embedded systems development, using consistent naming rules is super important for making your code easy to read, work with, and collaborate on. These naming rules help ensure that you give meaningful names to your modules, data types, functions, and variables. This makes it easier to create software for embedded systems that runs well and is reliable.

One thing to note is that these naming rules don't affect how fast your code runs, but they are absolutely essential for making your code understandable and easy to work with.

This document focuses specifically on naming rules and provides examples to show you how to use them. For the style of writing code, ENDA follows the Linux kernel coding standard, with a few small differences. You can find more details about that in the linked documentation below.

Exceptions to the Linux Kernel Coding Style

@arifbalik
arifbalik / usbip.md
Last active September 4, 2023 13:14
USB/IP Host Bringup

USB/IP Setup Guide

USB/IP allows you to share USB devices over IP networks, enabling remote access to devices as if they were connected locally. This guide outlines the setup process for both the server and client sides of USB/IP.

Server Setup

Install Linux Tools

To begin, you need to install the necessary Linux tools on your server. Use the following command:

@arifbalik
arifbalik / bridge.md
Created August 30, 2023 13:07
Setting Up a Bridge Between Two Ethernet Interfaces (Layer 2)

Setting Up a Bridge Between Two Ethernet Interfaces

To create a network bridge between two Ethernet interfaces (eth0 and lan0) on a Linux system, you can use the following steps:

  1. Open a terminal window.

  2. Edit the /etc/network/interfaces file using a text editor with administrative privileges. For example, you can use sudo and nano:

sudo nano /etc/network/interfaces

@arifbalik
arifbalik / generative1.js
Created January 11, 2022 17:37
my_first_generative
function drawQuad(x, y, size, colorQuad, distortX, distortY){
//randomSeed(x);
let marginX = random(distortX/5);
let marginY = random(distortY/5);
let points = {
x1:random(x, x + marginX),
y1:random(y, y + marginY),
@arifbalik
arifbalik / main.c
Created February 26, 2021 14:25
Collision Avoidance
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <stdint.h>
#define REC_WIDTH 130
#define REC_HEIGHT 85
#define CIRCLE_RAD 90
@arifbalik
arifbalik / Rotary_mew.ino
Last active November 25, 2020 07:26
Rotary MEW
#define X_STEP_PIN 54
#define X_ENABLE_PIN 38
#define ANALOG_PIN 4
void setup(){
pinMode(X_STEP_PIN, OUTPUT);
pinMode(X_ENABLE_PIN, OUTPUT);
TCCR0A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM21) | _BV(WGM20); // non-Inverting PWM,
OCR0A = 255;