<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/morse-code-with-net-on-a-raspberry-pi-mdcngt4yp" -->

---
title: Morse Code with .NET on a Raspberry Pi | daily.dev
description: A .NET console app converts typed text into Morse code and flashes an LED on a Raspberry Pi's GPIO pin. It uses the System.Device.Gpio package to control pin...
canonical: https://daily.dev/posts/morse-code-with-net-on-a-raspberry-pi-mdcngt4yp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Morse Code with .NET on a Raspberry Pi | daily.dev
og:description: A .NET console app converts typed text into Morse code and flashes an LED on a Raspberry Pi's GPIO pin. It uses the System.Device.Gpio package to control pin...
og:url: https://daily.dev/posts/morse-code-with-net-on-a-raspberry-pi-mdcngt4yp
og:image: https://api.daily.dev/og/posts/MdcNGt4YP.png
og:image:alt: Morse Code with .NET on a Raspberry Pi
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Morse Code with .NET on a Raspberry Pi

**[No Dogma Blog \(Bryan Hogan\)](https://daily.dev/sources/bryanhogan)** · 3 min read · 0 upvotes · 0 comments

## Summary

A .NET console app converts typed text into Morse code and flashes an LED on a Raspberry Pi's GPIO pin. It uses the System.Device.Gpio package to control pin 24, wired through a 330 ohm resistor to an LED. A dictionary maps each character to its Morse pattern, and a Transmit function toggles the pin high for 200ms (dot) or 400ms (dash), then low for 100ms between symbols. This is an earlier post that produced Morse code as sound instead of light.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nodogmablog.bryanhogan.net/2026/11/morse-code-with-net-on-a-raspberry-pi>

## Questions this post answers

### How do I control a GPIO pin on a Raspberry Pi using .NET?

Use the System.Device.Gpio NuGet package, create a GpioController, and open a pin in output mode, for example piController.OpenPin(24, PinMode.Output). You can then call gpio24.Write(PinValue.High) or PinValue.Low to turn a connected LED on or off, with Thread.Sleep calls controlling timing.

_Building GPIO projects with .NET on a Pi? Find more hands-on hardware walkthroughs on daily.dev._

### What are the standard Morse code timings for dots and dashes in milliseconds?

In one working implementation, a dot is transmitted for 200 milliseconds and a dash for 400 milliseconds, with a 100 millisecond pause between each symbol and a 500 millisecond pause between words. These values are used to drive an LED on a Raspberry Pi's GPIO pin to blink out Morse code from typed text.

_Experimenting with timing-based signals in code? Browse similar embedded and hardware projects on daily.dev._

## Similar posts on daily.dev

- [Pi Pico Learns Morse Code](https://daily.dev/posts/pi-pico-learns-morse-code-zpw5ndjtj) · Hackaday · 0 upvotes · 0 comments
- [Does Your Terminal Speak Morse? This One Does](https://daily.dev/posts/does-your-terminal-speak-morse-this-one-does-cpr5mpkj5) · Hackaday · 1 upvotes · 0 comments
- [Computer-generated dream world](https://daily.dev/posts/computer-generated-dream-world-hspk8igob) · Hacker News · 1 upvotes · 0 comments
- [This Raspberry Pi codes, clocks out, and chats on a BBS—and you can build one too](https://daily.dev/posts/this-raspberry-pi-codes-clocks-out-and-chats-on-a-bbs-and-you-can-build-one-too-35w1pt34l) · XDA Developers · 2 upvotes · 0 comments

---

Tags: [#hardware](https://daily.dev/tags/hardware), [#.net](https://daily.dev/tags/.net), [#c#](https://daily.dev/tags/c#), [#raspberry-pi](https://daily.dev/tags/raspberry-pi)

[View this post on daily.dev](https://daily.dev/posts/morse-code-with-net-on-a-raspberry-pi-mdcngt4yp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Morse Code with .NET on a Raspberry Pi","url":"https://daily.dev/posts/morse-code-with-net-on-a-raspberry-pi-mdcngt4yp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/morse-code-with-net-on-a-raspberry-pi-mdcngt4yp"},"datePublished":"2026-11-24T13:18:49.201Z","dateModified":"2026-11-24T13:19:10.682Z","description":"A .NET console app converts typed text into Morse code and flashes an LED on a Raspberry Pi's GPIO pin. It uses the System.Device.Gpio package to control pin...","image":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","thumbnailUrl":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","isAccessibleForFree":true,"articleSection":"No Dogma Blog (Bryan Hogan)","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"No Dogma Blog (Bryan Hogan)","logo":"https://media.daily.dev/image/upload/s--0RnGeoPG--/f_auto,q_auto/v1780213499/logos/bryanhogan?_a=BAMAMiWQ0","url":"https://daily.dev/sources/bryanhogan"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/morse-code-with-net-on-a-raspberry-pi-mdcngt4yp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"hardware,.net,c#,raspberry-pi","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"No Dogma Blog (Bryan Hogan)","item":"https://daily.dev/sources/bryanhogan"},{"@type":"ListItem","position":3,"name":"Morse Code with .NET on a Raspberry Pi"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/morse-code-with-net-on-a-raspberry-pi-mdcngt4yp#faq","mainEntity":[{"@type":"Question","name":"How do I control a GPIO pin on a Raspberry Pi using .NET?","acceptedAnswer":{"@type":"Answer","text":"Use the System.Device.Gpio NuGet package, create a GpioController, and open a pin in output mode, for example piController.OpenPin(24, PinMode.Output). You can then call gpio24.Write(PinValue.High) or PinValue.Low to turn a connected LED on or off, with Thread.Sleep calls controlling timing. Building GPIO projects with .NET on a Pi? Find more hands-on hardware walkthroughs on daily.dev."}},{"@type":"Question","name":"What are the standard Morse code timings for dots and dashes in milliseconds?","acceptedAnswer":{"@type":"Answer","text":"In one working implementation, a dot is transmitted for 200 milliseconds and a dash for 400 milliseconds, with a 100 millisecond pause between each symbol and a 500 millisecond pause between words. These values are used to drive an LED on a Raspberry Pi's GPIO pin to blink out Morse code from typed text. Experimenting with timing-based signals in code? Browse similar embedded and hardware projects on daily.dev."}}]}
```

