Posts

Showing posts with the label raspberry-pi3

How to access AT commands from PHP in Rasspberry Pi3?

Image
Clash Royale CLAN TAG #URR8PPP How to access AT commands from PHP in Rasspberry Pi3? I've tried from Raspberry Pi3 use minicom command and it works. SIM module is SIM7600CE. Just could not execute that command from PHP. <?php include '../src/PhpSerial.php'; $serial = new PhpSerial; $serial->deviceSet("/dev/ttyUSB2"); $serial->confBaudRate(115200); $serial->confParity("none"); $serial->confCharacterLength(8); $serial->confStopBits(1); $serial->confFlowControl("none"); $serial->deviceOpen(); $serial->sendMessage('AT+CMGF=1'); $serial->sendMessage(chr(13)); $serial->sendMessage('AT+CMGS="09xxxxxxxx"'); $serial->sendMessage(chr(13)); $serial->sendMessage("THIS IS TEST"); $serial->sendMessage(chr(26)); sleep(6); $read = $serial->readPort(); echo $read; $serial->deviceClose(); The code will return very strange words AT+CMGF=1AT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT+CAT...

Kivy Video Player is not working on Raspberry 3B+

Image
Clash Royale CLAN TAG #URR8PPP Kivy Video Player is not working on Raspberry 3B+ I just installed Rasbian Stretch and Kivy on my RPI3+ . My application work properly just videos are not playing. Rasbian, kivy and gstreamer are up to date. My application and video were working on KivyPie 0.9b without any problem. RPI3+ KivyPie 0.9b Does kivy has any config for video playing on manual installation of Rasbian? kivy Output logs: [INFO ] [MTD ] rotation set to 0 [WARNING] [Image ] Unable to load image [ERROR ] [Image ] Error loading texture ./data/images/welcome.mp4 [ERROR ] [VideoGstplayer] GStreamer encountered a general supporting library error. [ERROR ] [VideoGstplayer] GStreamer encountered a general supporting library error. [ERROR ] [VideoGstplayer] Internal data stream error. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of servi...

Mono (Linux, C#): DLL in same folder can not be found (System.DllNotFoundException)

Image
Clash Royale CLAN TAG #URR8PPP Mono (Linux, C#): DLL in same folder can not be found (System.DllNotFoundException) I am trying to run an C# program on my Raspberry Pi 3 using mono. The program starts correctly, but as soon as I reach a point where I use some OpenCV libraries the program error with the following output: Unhandled Exception: System.TypeInitializationException: The type initializer for 'Emgu.CV.CvInvoke' threw an exception. ---> System.DllNotFoundException: opencv_core220 at (wrapper managed-to-native) Emgu.CV.CvInvoke:cvRedirectError (Emgu.CV.CvInvoke/CvErrorCallback,intptr,intptr) at Emgu.CV.CvInvoke..cctor () [0x00023] in <4f43ef68be294203a100f85f9cebb2b6>:0 --- End of inner exception stack trace --- at Emgu.CV.Image`2[TColor,TDepth].AllocateData (System.Int32 rows, System.Int32 cols, System.Int32 numberOfChannels) [0x0002e] in <4f43ef68be294203a100f85f9cebb2b6>:0 at Emgu.CV.Image`2[TColor,TDepth].set_Bitmap (System.Drawing.Bitmap valu...

Kivy on Raspberry: Cursor is outside of window

Image
Clash Royale CLAN TAG #URR8PPP Kivy on Raspberry: Cursor is outside of window I am developing a GUI on my RaspberryPi 3 using Python3 and Kivy 1.11.0dev. The GUI is working, it is running in fullscreen after start (as far a I know since Kivy 1.9.x it is not possible to run a Kivy app as a window) and the mouse cursor is visible. The only problem now is that the user can move the mouse out of the visible area if he goes too far to the left, right, up or down. If this happens, it is difficult to get the cursor back to the visible area. I tried a lot to prevent that or to take the cursor back to window automatically but without success. From similar posts I tried things like this: Window.bind(on_cursor_leave=self.on_leave) def on_leave(self, *args): if self.hold: print('Cursor leaved Window') # call api calls here I also tried to grab the mouse Window.bind(grab_mouse=self.on_leave) Does anybody have a solution for putting the cursor back to the visible area after leavi...