c# - 我可以获得 C# Visual Studio 程序来控制树莓派吗?

标签 c# windows visual-studio raspberry-pi

我正在开发一个结合了 Visual Studio 应用程序和树莓派的项目。

有没有一种简单的方法可以通过 C# Visual Studio 程序在树莓派上运行终端程序(如“python script.py”)并检索结果?

最佳答案

如果您在 Raspberry 上运行 Windows 10

您可以在运行 Windows 10 的 Raspberry 上通过以下方式使用远程 Powershell:

# Start WinRM on the local Windows OS
net start WinRM

# Vérify RaspBerry PI3 access
Test-Connection jpbraspbpi3-1

# Allow accesss to Raspberry PI3
Set-Item WSMan:\localhost\Client\TrustedHosts -Value 'jpbraspbpi3-1'

# Etablish the connexion
Enter-PSSession -ComputerName 'jpbraspbpi3-1' -Credential (Get-Credential -UserName 'administrator' -Message 'Mot de passe !')

# You can allow a pseudo cmd.exe command line on the Windows 10 of your Raspberry
reg.exe ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\EmbeddedMode\ProcessLauncher" /v AllowedExecutableFilesList /t REG_MULTI_SZ /d "c:\windows\system32\cmd.exe\0"

然后你可以使用 developp 使用 .NET core on Raspberry .

如果您运行 RASPBIAN,您可以 deploy Mono并使用 visual studio 或 visual Code (.net core) 进行开发。

关于c# - 我可以获得 C# Visual Studio 程序来控制树莓派吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47785602/

相关文章:

asp.net - 如何让我的 ASP.NET 应用程序在我的自动化 UI 测试期间运行?

visual-studio - Visual Studio 中 eclipse 的 ALT+UP/DOWN(移动线)相当于什么?

c# - 变量未声明或从未分配?和数据读取器不工作?

c# - 如何使用 CrystalReport 对象和 TableAdapter 将 Crystal Report 导出到 Excel?

Python Tkinter - 使用退出按钮关闭子窗口

c# - 定义不同类型的二维动态数组

jquery - 如何让它自动在我的所有文件上运行?适用于 Visual Studio 的 YUI 压缩器

c# - 制作实时 3D 场景的最简单方法,有点像简单的游戏(用于模拟器可视化目的)

c# - .NET Core 3.1 中缺少菜单类

MySql 在 Windows 上出错,但在 Linux 上没有,指定的 key 太长