This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SCDQ5541 { | |
private: | |
int m_clock, m_data, m_load; | |
void bitbang(unsigned char code) | |
{ | |
digitalWrite(m_load, LOW); | |
for (int i = 0; i < 8; i++) { | |
digitalWrite(m_clock, LOW); | |
digitalWrite(m_data, code & 0x01); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ComeNCapture front end part. Handles the data sampling and buffer by using iCE40LP1K FPGA as logic capturer. | |
// Coded by TinLethax 2021/11/26 +7 | |
// Block RAM module, We use ALL bits of BRAM as STORAGE. | |
module BRAM( | |
input CLK, | |
input RCLK, | |
input [7:0]BRAM_IN, | |
output reg [7:0]BRAM_OUT, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(){ | |
printf("0123456789abcdefghij0123456789abcdefghij0123456789abcdefghij0123456789abcdefghij"); | |
printf("\n\t 1234567890\t 1234567890\t 1234567890\t 1234567890"); | |
printf("1234567890\t 1234567890\t 1234567890\t 1234567890\n"); | |
printf("\t 1234567890\t 1234567890\t 1234567890\t 1234567890"); | |
printf("12345678123456781234567812345678123456781234567812345678123456781234567812345678"); | |
printf("\t1\t12\t123\t1234\t12345\t123456\t1234567\t12345678\n"); | |
printf("12345678\t12345678\t12345678\t12345678\t12345678"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simple Script to Fully Unseal the BQ27541 or BQ27542 | |
# Coded by TinLethax 2021/06/02 +7 | |
# structure [Control_command0x00][lower byte][higher byte] | |
# Unseal first by writing 0x0414 (Sending Big endian ) | |
i2ctransfer -y -f -a 0 w3@0x55 0x00 0x14 0x04 | |
# Then writing 0x3672 (again, Big endian first) | |
i2ctransfer -y -f -a 0 w3@0x55 0x00 0x72 0x36 | |
sleep 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simple Script to check SEAL status of the BQ27541 or BQ27542 | |
# Coded by TinLethax 2021/06/02 +7 | |
# structure [Control_command0x00][lower byte][higher byte] | |
# Sending 0x00 subcommand (Sending Big endian ) | |
i2ctransfer -y -f 0 w3@0x55 0x00 0x00 0x00 | |
i2ctransfer -y -f 0 w1@0x55 0x00 r2 | |
echo Done! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simple Script to re-seal the BQ27541 or BQ27542 | |
# Coded by TinLethax 2021/06/02 +7 | |
# structure [Control_command0x00][lower byte][higher byte] | |
# Sending SEAL subcommand cause it to reseal (Sending Big endian ) | |
i2ctransfer -y -f 0 w3@0x55 0x00 0x20 0x00 | |
sleep 1 | |
i2ctransfer -y -f 0 w3@0x55 0x00 0x00 0x00 | |
i2ctransfer -y -f 0 w1@0x55 0x00 r2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bashrc setting for F1C100s Buildroot. Just make it more colorful UwU | |
PS1='\[\e[0;38;5;161m\]\h\[\e[0m\]@\[\e[0;38;5;49m\]\u\[\e[0m\]:\[\e[0;38;5;39m\]\w\[\e[0m\]#' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Key scanner to reverse engineer Blackberry Passport keyboard pinout. | |
* Coded By TinLethax (Can't remember the date, probably 2022/03/17). | |
*/ | |
// https://tinlethax.wordpress.com/2022/03/20/reverse-engineering-blackberry-passport-keyboard-pinout-part-2/ | |
// using Arduino Mega's pin 22 to 38 | |
// I updated the Conversion array (from arduino pin to actual connector pin). | |
// I sacrificed the keyboard (by taking it apart and bought a new one). | |
// to probe and get ~70% done with some left to probe with new kerboard (to replace the first one I took apart). | |
uint8_t toffcpin[16]={ | |
2, 3, 4, 5, 6, 7, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 500us Timer interrupt to drive stepper motor. | |
// Coded by TinLethax 2022/6/17 +7 | |
#define full_rev_step 200 | |
#define motor_pulse 2 | |
volatile uint8_t pulse_tog = 0; | |
volatile uint16_t pulse_cnt = 0; | |
#define motor_dir 3 | |
uint8_t dir = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ROS2 Remote Point Cloud Processing launch file using depth_image_proc | |
# Using this with Asus Xtion (no RGB) camera. Orange Pi Prime running Openni2 camera node. | |
# Original code by 808brick https://github.com/ros-perception/image_pipeline/issues/823 | |
# Modified by TinLethax 2023/07/28 +7 | |
import launch | |
from launch_ros.actions import ComposableNodeContainer | |
from launch_ros.descriptions import ComposableNode | |
def generate_launch_description(): |
OlderNewer