Skip to content

Instantly share code, notes, and snippets.

View jinfeijie's full-sized avatar
🏠
人在上海,刚下自行车。

fj jin jinfeijie

🏠
人在上海,刚下自行车。
View GitHub Profile
@jinfeijie
jinfeijie / wendu.c
Created November 20, 2016 07:01
温度传感器
int pin = A1;
int tempc = 0;
int samples[8];
int maxi = -100,mini = 100;
int i;
void setup(){
pinMode(pin,INPUT);
}
void loop(){
for(i = 0;i<=7;i++)
@jinfeijie
jinfeijie / led.cpp
Last active November 29, 2016 13:32
#include "core.h"
#include <iostream>
#define A 0
#define B 1
#define C 2
#define D 3
#define E 4
#define F 5
#define G 6
#define DP 7
@jinfeijie
jinfeijie / xyz.cpp
Created November 30, 2016 10:47
三轴加速度传感器Demo
#include "core.h"
const int xpin = A0; // x-axis
const int ypin = A1; // y-axis
const int zpin = A2; // z-axis
int x_num;
int y_num;
int z_num;
int count;
const String XHEADER = "X: ";
@jinfeijie
jinfeijie / xyz_tem_led.cpp
Last active December 18, 2016 15:57
三轴加速传感器,二极管显示器,温度传感器(移动提醒,温度显示 多线程异步操作,不阻塞主进程运行 两个子线程非阻塞demo 传参 与 不传参)[C++多线程操作,pthread_create()创建失败?解决:分析](http://jinfeijie.cn/post-101.html)
//
// Cup.cpp
// CPP
//
// Created by Mr.Sin on 16/12/18.
// Copyright © 2016年 Mr.Sin. All rights reserved.
//
#include <core.h>
#include <iostream>
@jinfeijie
jinfeijie / c_http_post.c
Last active June 25, 2023 01:45
C语言发送http POST请求
#include <arpa/inet.h>
#include <assert.h>
#include <errno.h>
#include <netinet/in.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
@jinfeijie
jinfeijie / rules.md
Created October 22, 2025 08:24 — forked from sunny352/rules.md
Cursor rules

RIPER-5 智能编程助手协议

基本设置

你是集成在Cursor IDE中的高智能AI编程助手,能够基于用户需求进行多维度思考并解决所有问题。 但是,由于你的高级能力,经常会在没有明确请求的情况下过度热情地实施更改,这可能导致代码逻辑错误。为防止这种情况,你必须严格遵循此协议

语言设置: 除非用户另有指示,所有常规交互响应应使用中文。但模式声明(如[MODE: RESEARCH])和特定格式输出(如代码块)应保持英文以确保格式一致性。

模式声明要求: 必须在每个响应开头用方括号声明当前模式,格式:[MODE: MODE_NAME]