led

Morse Code via iPhone LED

眉间皱痕 提交于 2020-01-11 11:32:46
问题 I have coded an App that can convert normal Text like : "Hello my Name is XY" into points and strokes ( ..-. ; --.- ; . ; - ; etc etc) Now I want to Convert these points and stroke into light flashes with the lenght of 0.3 sec for points an 0.6 seconds for strokes. also there is a pause with the length of a point after each point or stroke, a double pause after each Word, and a tripple pause/break after each sentences. The breaks are also implied into my code. The problem is now that the

汇编语言实现led灯的跑马灯

眉间皱痕 提交于 2020-01-05 02:00:29
led实验 1.看原理图 看设备工作的原理(可能需要阅读芯片手册),看设备与cpu的连接关系 GPIO具有输入输出功能。 输入:cpu想知道io引脚是高电平还是低电平那么就是输入方式 输出:cpu想控制io引脚为高电平还是低电平那么就是输出方式 跟电流的方向没有任何关系 2. cpu的相关章节 GPJ2CON control是配置这个引脚是什么功能 GPJ2有8个引脚,每个引脚由con寄存器中的4个位进行配置 GPJ2DAT 如果cpu要输出高电平或者低电平,就需要设置该寄存器,只有8位有效 When the port is configured as input port, the corresponding bit is the pin state. When the port is configured as output port, the pin state is the same as the corresponding bit. When the port is configured as functional pin, the undefined value will be read. 当配置为输入模式的时候,dat寄存器中的某一位的值由引脚设置,引脚是高电平是,对应的位为1,引脚为低电平时,对应的位为0 当配置为输出模式的时候,dat寄存器中的某一位控制引脚的电平

杰理AC692X---LED点灯

限于喜欢 提交于 2020-01-03 20:05:42
根据原厂SDK进行讲解 首先打开LED宏定义(sdk_cfg.h): 选择点灯方式(led.h): 一般选择PA/B/C/D口,PR口是在低功耗(假关机)模式下选择。LED驱动方式一般选择普通。 # define LED_PORTX JL_PORTA # define LED_BLUE BIT(3) # define LED_RED BIT(2) 根据项目需求配置GPIO口。上面代码配置的是PA3&PA2口。 # define LED_INIT_EN() do{LED_PORTX->PU &= ~LED_BLUE;LED_PORTX->PD &= ~LED_BLUE;LED_PORTX->DIR &= ~LED_BLUE;\ LED_PORTX->PU &= ~LED_RED;LED_PORTX->PD &= ~LED_RED;LED_PORTX->DIR &= ~LED_RED;}while(0) # define LED_INIT_DIS() do{LED_PORTX->PU &= ~LED_BLUE;LED_PORTX->PD &= ~LED_BLUE;LED_PORTX->DIR |= LED_BLUE;\ LED_PORTX->PU &= ~LED_RED;LED_PORTX->PD &= ~LED_RED;LED_PORTX->DIR |= LED_RED;}while

Arduino (processing) Library in Netbeans and control

回眸只為那壹抹淺笑 提交于 2020-01-01 12:07:09
问题 I am trying to control 4 LEDs and getting analog input from 4 contacts. The program is written in java, so to gain acces to the functions of arduino, such as AnalogRead() and setting an LED to high or low, would importing the processing library let the program use those functions? I was also wondering, if the program, will be transferred to the arduino it self, or the java program will just pull the data from the pins? 回答1: Update : My suggestion is to first try communicating the Arduino with

Control Android LED from shell

旧巷老猫 提交于 2020-01-01 08:50:55
问题 I have seen several questions (and blog posts, elsewhere) with Java code for controlling the notification LED on an Android device. That's not what I'm looking for. I'm wondering if there is any way to access the appropriate commands / controls / frameworks from the shell (Perl, ruby). What I want, ultimately, is a very simple "heartbeat" pulse - when the device is on and the display is off, blink at me. Alternatively, if anyone has written a really simple "toy" app that blinks the LED, I'd

Can I detect the presence/absence of 'LED notification' on an Android device?

穿精又带淫゛_ 提交于 2020-01-01 04:17:11
问题 Background: I have an app with notifications and I want to support LED notifications (and it's working perfectly). In my preferences, I allow the user to customize the LED notifications. Problem: I don't want to show the LED customization options if the device doesn't support them because it can possibly confuse the user (If all you've had were cheap Androids, you have no idea what LED notification is). Is there an API that I can use to detect if the device supports it? if there is an 'old'

Showing flashing LED for foreground activity / screen on

百般思念 提交于 2019-12-30 10:53:39
问题 I'm trying to turn the LED-flashing on for my activity in foreground, but it works only when the screen is off. Is it possible to turn the LED on for active activity with the screen on? My code: protected void led() { Notification notif = new Notification(); notif.ledARGB = 0xFF0000ff; notif.flags = Notification.FLAG_SHOW_LIGHTS | Notification.FLAG_ONGOING_EVENT; notif.ledOnMS = 800; notif.ledOffMS = 200; notificationManager.notify( LED_NOTIFICATION_ID, notif ); } 回答1: At first Android LED

Sort Coordinates from top left to bottom right

本小妞迷上赌 提交于 2019-12-24 12:11:53
问题 I extracted 110 coordinates from contours of a 10x11 LED-Array using C++ and OpenCV and stored them in a vector. Now I want to sort them from top left to bottom right to detect if a LED in a certain row and column is on. I presorted the coordinates by y-position to make sure that the first 10 coordinates in the vector representing the first LED row in my Image. vector<Point2f> centers; bool compareY(Point2f p1, Point2f p2){ if(p1.y < p2.y) return true; if(p1.y > p2.y) return false; } sort

Pygame through SSH does not register keystrokes (Raspberry Pi 3)

流过昼夜 提交于 2019-12-23 03:51:30
问题 So I got raspi 3 and simple 8x8 LED matrix. After some playing with it I decided to make a simple snake game (displaying on that matrix) with pygame's events, I have no prior experience with pygame. There is no screen/display connected besides the led matrix. So the problem at first was "pygame.error: video system not initialized", though I think i got it fixed by setting an env variable: os.putenv('DISPLAY', ':0.0') Now that I got it working I run it...and nothing happens, like no keystrokes

Pygame through SSH does not register keystrokes (Raspberry Pi 3)

南楼画角 提交于 2019-12-23 03:51:24
问题 So I got raspi 3 and simple 8x8 LED matrix. After some playing with it I decided to make a simple snake game (displaying on that matrix) with pygame's events, I have no prior experience with pygame. There is no screen/display connected besides the led matrix. So the problem at first was "pygame.error: video system not initialized", though I think i got it fixed by setting an env variable: os.putenv('DISPLAY', ':0.0') Now that I got it working I run it...and nothing happens, like no keystrokes