Тёмный

Programming Logitech Keyboard to Display Twitch Chat 

javidx9
Подписаться 315 тыс.
Просмотров 26 тыс.
50% 1

A two-in-one special showing how to hack a Logitech G13 keyboard to display whatever you want! I use Twitch chat as an example. Albeit, I get it wrong first try but ultimately it works...
Code: github.com/OneLoneCoder/Javid...
Blog: onelonecoder.com

Наука

Опубликовано:

 

22 май 2017

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 49   
@danorjestad4605
@danorjestad4605 4 года назад
For anyone wondering, twitch chat uses the very old (but very good!) IRC-protocol. That should clear up why the returned data looks so odd :)
@xtc_w
@xtc_w 5 лет назад
I can hear a dota 2 stream at the end there. Clearly a smart man. As I'm typing this it comes on screen. Nice.
@javidx9
@javidx9 5 лет назад
XD
@PhilBoswell
@PhilBoswell 6 лет назад
Heh, sockets are fun. A friend and I discovered a bug in UNIX sockets way back in the day which actually crashed the system: we'd been told about these things in class and decided to cobble up a little "chat" system which basically meant each of us coded a thing which opened the same socket and talked to it: nothing sophisticated, we didn't get that far ;-) Lucky for me, he was the first to compile and run which was when the bug made itself apparent: I say "lucky for me" because that meant his username showed up in the coredump when the techs went to find why their nifty machine had fallen over ;-)
@javidx9
@javidx9 6 лет назад
lol, even then all your info was recorded...
@Aitor
@Aitor Год назад
Wonderful work! Imagine this man making an app that allows Logitech G19 to show the actual Twitch video footage. That would be amazing!
@Rayer24
@Rayer24 Год назад
This video inspired me to make my own twitch chat bot that does some cool things with the twitch API. I just know basic concepts but it's my first "big" project and quite happy how it's coming along after less than 2 weeks.
@blisterfingers8169
@blisterfingers8169 5 лет назад
I looked at how to do stuff on these panels a while back and gave up. Their docs are functional but no good at helping out newbs like most modern docs are trending toward. Those panels are nifty and it's a shame no one really did anything with them. A few games display logos which is useless. A few do display info but it's actually very unnatural and jarring to look away from the screen and down at your keyboard; Something most of us stopped doing a long time ago. There's a criminal lack of actual apps out there for these panels. The best is one called LCDSirReal which you can still find around the web. It's just a monitor app but it's 10x better than the built in one. Anyway, another great vid from your backlog I'm catching up on, Javid. I might have another go at this sometime.
@Torchl146
@Torchl146 3 года назад
this is so funny i just had the idea to write a programm to show my own programm on the logitech screen and now you have a kind of tutrial for that XD great
@Torchl146
@Torchl146 3 года назад
its insane almost any idea you have is already there XD
@nevin3543
@nevin3543 3 года назад
They might not have good software, but that sdk looks really nice to work with
@AsilarWindsailor
@AsilarWindsailor Год назад
I'd like to see a more in depth WinSock server and client model implementation some time. It looks like using WinSock is pretty hairy. The IRC program mIRC I find handles opening and closing sockets very cleanly in its built-in script editor. It's as easy as: /sockopen switches name ip port You can then just /sockwrite socketname message Ofcourse you need to have supporting code to listen for incoming connections and messages which is also very easy in mIRC. Might be worth a quick look and like I said before, I'd like to see a further dive in to WinSock some day
@shiveringnewborn
@shiveringnewborn Год назад
great video :) thank you
@jockinafrock
@jockinafrock 5 лет назад
Hi javidx9, ironically I had a G15 v1 keyboard for many years, but it died last year. However I've built and tested this project while stripping out the Logitech API sections. I've registered with Twitch and got my own OAUTH token, but I still can't get this app to read anything form your twitch chat window. Any pointers on debugging this? Wireshark perhaps ?
@javidx9
@javidx9 5 лет назад
It is possible (and I may be incorrect) that the twitch API has changed ever so slightly since this video. I do however have successful twitch chat code which i use in all my livestreams etc so i do have working code. If you're on the discord hit me up to compare notes, otherwise let me compare the code from this video to my new code and see if i can remember what the slight difference was, but that may be in a little while.
@jockinafrock
@jockinafrock 5 лет назад
@@javidx9 Fixed this, I was getting my OAUTH token through Twitch's Developer pages. I got one from twitchapps.com/tmi and that worked a treat.
@tioaoa9658
@tioaoa9658 6 лет назад
Good vid
@javidx9
@javidx9 6 лет назад
Thanks Tioaoa!
@pyrrhaloict4198
@pyrrhaloict4198 7 лет назад
Hey, Nice video ! But I can't get even the most basic c++ template to work even if I did the same things as you. I have a "no target architecture error"
@javidx9
@javidx9 7 лет назад
Hi Pyrrha, Cheers! The "No Target Architecture" error indicates that you have not set up your project correctly. There could be a lot of reasons for this but check that you specify the correct platform - x86 or x64 and that its consistent throughout your project. I'm assuming you're using the latest visual studio. You may also get this error if you're using pre-compiled headers. I always like to start with a "Win32 Console Application", select "empty project" and unselect "precompiled header". This gives you just a blank canvas, and then you're responsible for all the code. Good Luck!
@qibcentricsplayground2043
@qibcentricsplayground2043 4 года назад
hi there! is it possible to do something like this for Telegram on desktop? or does this only work for IRC-based messages
@javidx9
@javidx9 4 года назад
The approach I show is really only suited to simple text based protocols. Im unfamiliar with Telegram, but ultimately its all just bits and bytes so i dont see why not...
@qibcentricsplayground2043
@qibcentricsplayground2043 4 года назад
@@javidx9 cuz i am really unfamiliar w APIs and programming stuffs. Can i have some tips on enforcing coding skills? i have just basic experience on python and C++ :( and i alr struggled during my diploma phase sigh
@DanCojocaru2000
@DanCojocaru2000 4 года назад
You can try to use tdlib. It is a little rough to understand for beginners though.
@danielpettersen1850
@danielpettersen1850 5 лет назад
Ok, I'm struggling a bit with the SDK documentation. Does anyone know if it has access to the power settings of the USB outputs on the keyboard or is this purely for the visual display of the LCD screen?
@javidx9
@javidx9 5 лет назад
I believe its just for screen and macro control, the API is unlikely to give you lower level control.
@danielpettersen1850
@danielpettersen1850 5 лет назад
​@@javidx9 Thank you for the reply. :)
@SoulNotBody
@SoulNotBody 2 года назад
Sadly I want to do this but having trouble with my lack of knowing what unicode it when I put (L"insert name here" ....) it flags the L
@funkiEst
@funkiEst Год назад
Mmm... i'm wondering if getting some second hand g13 for working purposes with VFX apps and... i think this is a "left handed device" yes but... for right handed users, isn't it ? cause i think the ideal usage for a left handed guy like me would be: mouse or graphic tablet in the left hand and G13 /keyboard in the right hand, RIGHT ? hahaha well... anyways even if there is not a "right handed" version for left handed guys... this looks like an interessting option, thank you very much for thhe unique video
@javidx9
@javidx9 Год назад
I've never thought of it like that before. I do use it with my left hand for video editing, but im right handed.
@TheDyingFox
@TheDyingFox 4 года назад
implement word filter on the chat, highlight/remove before showing on LCD xD
@defektruke
@defektruke 4 года назад
can you make something with raspberry pi :D
@ZMITCHELL84
@ZMITCHELL84 6 лет назад
I've always wanted my G15 LCD to work as a console display for a 'nix system. Anyone have any idea where to start on that?
@javidx9
@javidx9 6 лет назад
Yes, you could do this by redirecting a terminals stdin and stdout to your application and updating the display accordingly by interpreting escape codes etc. The downside is your terminal is not running on the keyboard it has to be running on your machine, so is it worth it? Would be cool though!
@ZMITCHELL84
@ZMITCHELL84 6 лет назад
I think it could be worth it in my case. It would be on my linux media server. It would be like a very compact KVM. Ideally, I would have the app mapped to one of the G-Keys. If I needed to do something really simple I would just hit the appropriate G-Key and get a login prompt on the LCD of my G15. I'm not sure if it would be more appropriate to have it be an actual console connection/redirect or it being an ssh to localhost. I mean, I can do all this on my desktop or my phone via SSH, but this is just a cool idea. TL;DR: I just don't want to hook up a screen to my server and I like the idea of the LCD on my G15 being a simple interface...
@deathreus
@deathreus 5 лет назад
26:28 D: const_cast at minimum!
@Veso266
@Veso266 3 года назад
Why do you guys still use hungarian(the thing when you put s before variable name to indicate its string) notation when developing in c++ even if todays IDEs can quickly tell you the types when hovering over variable?
@trueverdicts685
@trueverdicts685 3 года назад
Could have used a queue instead of a list
@zmol
@zmol 3 года назад
EDIT: LogiLcdInit((wchar_t*)L"G13_tester", LOGI_LCD_TYPE_MONO); solved it (for now :) I'm using your code up to the Hello World part, but I get errors from the lines that use L"text": argument of type "const wchar_t*" is incompatible with parameter of type "chart_t*" and bool LogiLcdInit(wchar_t*,int)':cannot convert argument 1 from 'const wchar_t[11] to 'wchar_t'
@javidx9
@javidx9 3 года назад
Sounds like the character set for string literals for your compiler isn't compatible with the API. Try enabling unicode in project properties.
@Muffin_Cat
@Muffin_Cat 3 года назад
21:53
@Muffin_Cat
@Muffin_Cat 3 года назад
4:00
@AI-ec2qb
@AI-ec2qb 4 года назад
I barely know VBA 😔
@DanCojocaru2000
@DanCojocaru2000 4 года назад
Piero Carlini It's not too hard to get into C++, though this stuff is a little more advanced level.
@ooze9808
@ooze9808 3 года назад
damn....you use very large font
@javidx9
@javidx9 3 года назад
So people on mobile devices can see the code?
@David_94
@David_94 4 года назад
12:33 the interesting part
@joey86bu1
@joey86bu1 3 года назад
Can u program a logitech keyboard to not fucking suck?
Далее
Fast and Simple Approximation of Sine Function
11:22
Просмотров 32 тыс.
Line Of Sight or Shadow Casting in 2D
50:23
Просмотров 141 тыс.
치토스로 체감되는 요즘 물가
00:16
Просмотров 3,1 млн
Practical Polymorphism C++
41:44
Просмотров 124 тыс.
Homemade Macro Keypad and Password Manager
8:34
Logitech G13 Keyboard Review
6:01
Просмотров 14 тыс.
2D Sprite Affine Transformations
27:59
Просмотров 33 тыс.
Texture Sampling #1: Points & Borders
30:32
Просмотров 32 тыс.
CoPilot Review: My Thoughts After 6 Months
9:45
Просмотров 538 тыс.
Programming Mazes
27:11
Просмотров 190 тыс.
Emscripten Tutorial for Web Developers
1:03:02
Просмотров 7 тыс.
🛑 STOP! SAMSUNG НЕ ПОКУПАТЬ!
1:00
Просмотров 134 тыс.
Best mobile of all time💥🗿 [Troll Face]
0:24
Просмотров 1,3 млн