I want to do what I wrote in the headline. But I just can not get my head around it I also went to everything I wanted to write a special type of FIFA file, by MKIFIFO (I think). If there are other suggestions on how to do this, you are welcome. solution !!!! PI-Blaster works: D: D (for this reason, lost 2 days of life) writes. The flush was important, BTID. Fixed class PWM {Fixed String Fifonam = "/ dev / pi-blaster"; Static filestream file; Write a static streamer; Stable PWM () {file = new FileInfo (Fifonam) Openwork (); Write = new streamer (file, encoding. ASCIII); } // FIRST METHOD Public static zero set (int channel, float value) {string s = channel + "=" + value; Console.WriteLine (s); Write.Write (s); // SECOND METHOD // run program (s); } / / The second method is static zero runprogram (strings) {System.Diagnostics.Process proc = new System.Diagnostics.Process (); Proc.EnableRaisingEvents = True; Proc.start.info.FileName = "bash"; String x = "| echo" + s + "& gt; / dev / pi-blaster"; Console.WriteLine (x); Proc.StartInfo.Arguments = x; Proc.StartInfo.UseShellExecute = false; Proc.StartInfo.RedirectStandardInput = True; Proc.Start (); // proc.WaitForExit (); }}
Nom place prototype AP {Static class PWM {static string FIFFNAM = "/ dev / exemplary-blaster"; Static filestream file; Write a static streamer; Stable PWM () {file = new FileInfo (Fifonam) Openwork (); Write = new streamer (file, encoding. ASCIII); } // FIRST METHOD Public static zero set (int channel, float value) {string s = channel + "=" + value + "\ n"; Console.WriteLine (s); Write.Write (s); Write.flush (); }}}
No comments:
Post a Comment