GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    lamp (lamp@kitty.haus)'s status on Wednesday, 01-May-2024 16:50:43 JSTlamplamp
    const int buttonPins[] = {2,3,4,5,6,7}; int lastBtnState[6] = {HIGH, HIGH, HIGH, HIGH, HIGH, HIGH}; unsigned long lastBtnTime[6]; void setup() { for (int i = 0; i < 6; i++) { pinMode(buttonPins[i], INPUT_PULLUP); } pinMode(LED_BUILTIN, OUTPUT); Serial.begin(9600); } void loop() { for (int i = 0; i < 6; i++) { int btnState = digitalRead(buttonPins[i]); if (btnState != lastBtnState[i]) { if (micros() - lastBtnTime[i] > 1000) { OnBtnStateChange(i, !btnState); } lastBtnState[i] = btnState; lastBtnTime[i] = micros(); } } } void OnBtnStateChange(int btn, bool pressed) { Serial.print(btn); Serial.println(pressed); digitalWrite(LED_BUILTIN, pressed); }
    In conversationabout a year ago from kitty.hauspermalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.