Questions tagged [c#]
For questions pertaining to compiling C# programs on the Raspberry Pi.
81
questions
-2
votes
1
answer
127
views
Hardware PWM 0 oscillating before application runs
I would like to use Hardware PWM0 on a Raspberry Pi 3B. There i enable it in "/boot/config.txt" with
dtoverlay=pwm,pin=18,func=2
In software I use the following code
using System.Device.Pwm;
...
0
votes
1
answer
44
views
LED In series with input pin
I was wondering if anyone here may be able to help me.
I currently have a C# program running on a raspberry pi, that detects the state of a toggle switch connected to pin 13, and ground. I have an LED ...
-1
votes
1
answer
528
views
WinForms Application on Raspberry Pi OS
Im running Raspberry Pi OS (formerly Raspbian) on a RaspberryPi. I have to develop a WinForms app. RaspberryPi OS is based on Debian. This means I can use the .NET Core SDK (via a snap package). Or I ...
0
votes
1
answer
30
views
How resumes reading from USB virtual com after client reset?
I have dotnet-core app on raspberry pi 4, which reading data from USB serial port (virtual com) from STM-Microcontroller board.
When I reset the STM-board, the pi stop receiving data !
How can I ...
1
vote
1
answer
88
views
How to get more samples from ADC converter using SPI
I am trying to use ADC converter in my raspberry which has speed around 100k smp/s. I am setting clock as producent of converter recomend for 20 Mhz. But I only recive around ~ 43k samples/s and I can'...
2
votes
2
answers
1k
views
Raspberry PI with Linux and C# on it - how to read hardware/sensor info
I need to create a Monitor.Health service that receives pings on each of the client's raspberries each 5 minutes , showing tempreture of the device , is it online and other hardware info that is shows ...
0
votes
1
answer
372
views
How to install Visual Studio on Raspberry Pi using command in linux? [closed]
I am have installed Raspberry Pi on my machine, i want to install VS Code. I am using this special command to do this and its not doing anything as its not recognizing it from the terminal. I need ...
1
vote
2
answers
305
views
How to publish .netCore DIFF to RaspberryPi from Visual Studio Community?
I use .netCore 3.1 and Raspbian buster.
For the moment I build the .netCore 3.1 solution via this command :
dotnet publish -r linux-arm ../MySolution.sln
Then I publish it with SSH and Putty
pscp ...
3
votes
0
answers
317
views
Coin acceptor misbehave when connected on raspberry pi
I have a Bill note acceptor and a Coin acceptor, and I have wrote a program in C# to communicate with these two machines, and it worked perfectly on windows, after that I migrated this application to ...
2
votes
1
answer
1k
views
Receive data on the raspberry with c# using mono
I want to send strings between the raspberry and a windows computer via serial and with c#. This works from the raspberry to the computer as shown below. In the picture you can see that I have sent a ...
1
vote
0
answers
69
views
How to receive serial data with c# on a raspberry with mono [duplicate]
Hello I want to make a program for the computer and the raspberry, this program must ensure that the raspberry and the computer can communicate via serial. I have already found a code that does this, ...
0
votes
0
answers
309
views
How to change the decimal separator in C# for raspberry pi with mono?
I'm working on a C# application that I run on raspberry pi with mono.
I would like to convert a double A = 0.05 to a double B = 0,05.
I succesfully did it on my computer, I changed my Number Decimal ...
5
votes
4
answers
5k
views
Setting Pull Up/Pull Down mode doesn't work (mostly)
I can't seem to set the pull-up resistor mode on the PI4 with most methods I try. I have tried: C# (the new System.Device.Gpio interface), WiringPi (using a C# abstraction), and wiringPi command line ...
1
vote
0
answers
289
views
Interrupt issue - Wiringpi and pigpio show different values for pin
I am having an issue with raspberryio/wiringpi interrupts. A lot of extra interrupts are generated. My configuration is as follows:
Physical pin 16:
Set as input
Pulldown resistor
Interrupt ...
1
vote
1
answer
307
views
MQ-2 sensor gas detection on Windows 10 IoT
I am completely new on Raspberry Pi.
As of my IoT project i am planning to detect amount of Methane and Carbon dioxide from the biogas combustor, and maintain a log in real time.
I am planning to ...
6
votes
1
answer
2k
views
SPI access via C# .NET Core console app
I do not have much experience with C# or Linux/Raspbian so would like some advice/guidance please.
Basically I need to write a C# .NET Core console app which will run on a Raspberry Pi Compute 3 ...
1
vote
0
answers
405
views
C# "/dev/ttyGS0" throws error "Invalid Argument"
I'm working on an application for my pi in C# code. The overall idea is to create a usb "pc status" monitor that I can put inside my PC case.
My code that runs on the pi uses a ini file for settings. ...
1
vote
1
answer
1k
views
UART Raspberry pi IoT (Windows IoT Core)
UART data transmission Raspberry pi UART (RX TX) Arduino
I know should avoid async void. They are only used for event handling. For other methods return Task. async and await
Where can there be a ...
0
votes
1
answer
193
views
Raspbian -.net core application won't reload configuration
Issue:
I am running a .net core application on a Raspberry PI. I am loading the configuration from a JSON file and storing in a class for reference in the application - a hosted service in this case. ...
1
vote
1
answer
1k
views
Mono for Raspberry Pi Zero
I am trying to run a simple "Hello, World" C# app on my Raspberry Pi Zero. It works fine on my Raspberry Pi B+, but I get an "illegal instruction" error on the Zero. In both cases, I am compiling ...
1
vote
0
answers
59
views
How to use Raspberry.IO.SerialPeripheralInterface?
I found the package which is possible communicate in SPI mode, but I dont found a way to use with sucess. So, Anybody could show how to use this package? I am currently using C# in Xamarin.
1
vote
0
answers
70
views
How to communicate Raspberry Pi 3 with Arduino via ISP with C#?
Currently need use the Xamarin as IDE.
I need communicate a raspberry as master with a Arduino Pro mini as slave using C#.
I dont know how to call/set the MISO and the MOSI. I believe that have a ...
1
vote
1
answer
547
views
Trying to run a C# Discord Bot on Raspberry Pi 3 Model B+ with Windows 10 IoT
I have developed, in Visual Studio 2015, a C# Console Application which uses the Discord.Net API. It works great running on my PC, which has Windows 10, however I am looking to run the program 24/7 on ...
2
votes
0
answers
275
views
GPIO Library in Windows Visual Studio 2012 (C#)
I am developing an application in Visual Studio 2012 (C#) + Raspberry Pi 3 and I have some problems in accessing the GPIO of Raspberry Pi 3. Does anyone recommend any library that access GPIO for ...
1
vote
1
answer
654
views
Unosquare.RaspberryIO: unregister from InterruptCallback
I'm developing an application on C# using Unosquare.RaspberryIO. My question related to interrupts and callbacks. According to the documentation, it's possible to register callbacks. For example:
pin....
1
vote
0
answers
309
views
Httplistener on Raspberry Pi
I have an asynchrone Webserver in C# and it runs perfect on Windows. I get a Request every 20 ms and its answering directly.
I published my solution for linux-arm with the command:
dotnet publish -...
0
votes
1
answer
1k
views
Running my own Discord.Net bot
I recently got a RPi3B for my birthday and I just made my own C# discord bot using Discord.Net
I created some commands and figured it'd be cool to run it on my RPi so I don't have to have my laptop on ...
3
votes
1
answer
482
views
TMP36GZ/DS1822 Temperature Sensors not outputting any values
I am trying to connect a temperature sensor to my Raspberry Pi using this tutorial for Windows IoT Core.
I have connected all of the wires and MCP3002 correctly, but I cannot read in any values from ...
2
votes
1
answer
95
views
Windows 10 core with Raspberry Pi
I amusing C# UWP and i am storing sensor data to a database. What I would like to do is send the Sensor name instead of the GPIO Number.
So on pin_valuechanged()
I like to assign the pinNumber a ...
1
vote
1
answer
2k
views
How to run a c# web service from a raspberry pi 3?
I want to write a simple web service in c# using Visual Studios, and deploy this service from a Raspberry Pi 3. I know mono is a tool that runs .NET code on Linux machines, but all of the examples I'...
1
vote
1
answer
979
views
WIndows IOT StreamSocketListener Stops working
I am having a issue with a socket listener. It will work for a few mins thenjust stops listening. I have tried to enable and disable Compile in .Net option as suggested in other forums with no luck.
...
1
vote
0
answers
184
views
Windows 10 IoT Raspberry PI Xaml Question
All,
First I want to say thank you to all the people who have helped me to get my app as far as I have it. Because of what I needed it was a hard learning curve.
Now I want to improve some of the ...
1
vote
4
answers
2k
views
TCP Server Windows 10 IOT
I am having problems getting a TCP server to connect. I tried to pull apart the sample and thought I had everything correct. For some reason the server never accepts the incoming connection.
Code:
...
2
votes
1
answer
1k
views
Use SPI pins from ASP.NET Core application on RaspberryPi 3
In my project I have a Raspberry Pi 3 with Windows IoT OS, and I have a RC522 RFID reader. I would like to use this component (RC522) from my ASP.NET Core application.
I would like to use this ...
2
votes
1
answer
658
views
Change WiFi networks Programatically
Running a Raspberry Pi with Windows 10 IoT
Couple questions.
is there a way to stop the program from code to enter the boot screen?
Is there a way to join see and join wireless networks from code?
I ...
1
vote
0
answers
192
views
Focusrite USB Mic Drivers
I wanted to use a Focusrite Solo to be able to use a better quality mic with my raspberry pi 3 with windows 10 IoT Core and a Voice recognition program I am developing.
I see it as a device in the ...
2
votes
1
answer
120
views
Application on Mono stopped working properly
I am running a .Net application under Mono for months now. I did an apt-get upgrade and then after trying to run the application I get NullReference unhandled-exceptions in class constructors. I ...
1
vote
1
answer
2k
views
Turn off LCD touch screen on Windows 10 IoT Core
I am using 7" touch screen on my RaspberryPi 3 Model B v1.2. My device is running Windows 10 IoT Core and I've designed the kit to run an application I am developing as a UWP application with ...
2
votes
1
answer
2k
views
Get network interface MAC address with Windows IoT
I'm using Windows IoT Creators Update on my Raspberry Pi 3 and programming with C#. I want to read my network adapter MAC address.
When I use NetworkInterface.GetAllNetworkInterfaces() it throws ...
2
votes
1
answer
306
views
Windows 10 IOT voice recognition
Good evening,
I have been playing with the voice recognition in Windows 10 IOT core and C#. One thing I am having a issue with is keeping the recognition engine running. I have tried looking online ...
3
votes
0
answers
477
views
Controlling Stepper Motor with Raspberry Pi 3 and Win 10 IoT
I am working on a project which requires operating bipolar stepper motor with Raspberry Pi 3 and Windows 10 IoT core. I am writing the program in C#.
Currently, I am getting the pulses on the motor ...
2
votes
0
answers
259
views
Raspberry Pi + Windows 10 IoT Core + RS485
Has somebody ever worked with windows 10 IoT Core and used RS485?
I would like to receive some signals from the RS485 device.
I would like to do this with Windows universal app.
1
vote
0
answers
334
views
How do I get a Unique Identifier for a Raspberry PI within Windows 10 IoT Core (Creators Update)
I tried this Method (found on https://stackoverflow.com/a/31803247/2427812) on Windows 10 IoT Core [Version 10.0.15063] (Raspberry PI 3) to get the HardwareId but the result of GetId() changes every ...
1
vote
0
answers
190
views
Library use Character LCD in Windows Iot Core
I am starting using windows IoT Core and I want to display data from sensor in Character LCD 16x2.
who can I do that ?
0
votes
1
answer
272
views
Deploy-Publish error on Windows 10 IoT Core from laptop, (but from a desktop it works)
I'm getting this issue when I try to publish on a Pi 2 or 3 a "universal app", (my project).
It's strange because from my desktop PC (Intel I7 - Win10 Pro - VS 2017), it works well but when I try to ...
0
votes
1
answer
316
views
Communication between C and C# program on RPI3
I have a question i wondered by myself if it is possible to communicate between a C# and C programm.
I want to use the C# program for the user interface and then send commands to the C program that ...
1
vote
0
answers
249
views
Windows IOT Background Task doesn't complete
I just recently started with the Windows 10 IOT Core on the Raspberry Pi 3 and am currently writing my first applications. Everything went well so far, but I noticed, that while debugging an ...
1
vote
0
answers
343
views
Cloud-to-Device message to raspi from IOThub
What I am trying to do at this time is control LED lights on Raspi running windows 10.
so far I have an application running and waiting for a message to receive. it works fine when I use Device ...
2
votes
1
answer
423
views
Does someone in here knows how to rewrite this in C# for an UWP application?
import struct
import smbus
import sys
def readVoltage(bus):
"This function returns as float the voltage from the Raspi UPS Hat via the provided SMBus object"
address = 0x36
read = bus.read_word_data(...
1
vote
0
answers
2k
views
How do you get an RFID reader to work with Raspberry Pi 3 and UWP?
everyone!
This question is in relation to my Raspberry Pi 3 and Windows 10 IoT Core project. I intend to use an RFID Reader (short range only), along with an universal windows application, plugged to ...