I have a BeagleBoneBlack and im trying to find a way to control a 128x64 Graphic LCD using python(This display, more specifically http://www.newhavendisplay.com/specs/NHD-12864AZ-NSW-BBW-TR.pdf), and i dont know exactly how to do it.
Last time that i used this display i was working with a PIC16F877A using the MikroC compiler and it has a library specifically for this GLCD display so it was bearly easier. I searched superficially for some solution but i dont find anything, do you guys know some solution or i have to create my own library to this application?
It looks like you should be able to get something working quickly based on the Linux Kernel FBTFT driver subsystem.
Latest upstream sources show a quite wide range of supported displays. At a cursory look the controller seems to be part of the KS0108 family:
KS0107B / KS0108B; S6B0107B / S6B0108A; HD61203 / HD61202; AX6108 / AX6107; PT6608 / PT6607; SBN0064 / SBN6400; KS0708; S6B0708; ST7548; ST7588; NT7108; RA8808; RW1065; and equivalents.
Please note that by default the beagleboard.org Debian images come with an older kernel. At least it looks like the 4.14-ti kernel build config does enable FBTFT as a module. So if you're really lucky it might even work out of the box. Though I'd be prepared to rebuild the kernel.
Feel free to ask me to expand on certain aspects of the above. This is a high level view with some pointers right now.
Related
I am trying to capture images from a Mightex cmos usb camera (SCE-B013-U) with Python 3.6.5 and opencv-python 3.4.3.18. The software came along confirms the camera works fine. But, cv2.VideoCapture(0).isOpened() is false. I am sure I am missing something, but I do not know what. Please help. Thanks a lot in advance.
For testing I have 1 camera installed on my setup that I know is opencv compatible with the command below:
print(cv2.VideoCapture(0).isOpened())
returns True for me, but if I unplug the camera, it returns False. False can imply that there is no camera available....
If the other answer (above) yields no result, perhaps the installed driver may not be compatible with opencv?
From the product description:
In addition, a user-friendly GUI based application software and an SDK
are provided for custom software development. A USB command set
protocol is also provided for non-Windows based application
Cannot help but to think that this company may be following a different standard to the one opencv typically uses. For example, many USB3Vision cameras will not work out of the box in the way you are attempting and require additional programming to return a NumPy style array image.
Additional support for my thinking is in the "EXAMPLE OF GRAPHICAL USER INTERFACE"
Many of the options I've seen in the GeniCam standard (USB3Vision).
Camera Mode (Continuous / Trigger), Exposure Control, Autoexposure Enable, etc
This is not to say that the camera is definitely is or is not one or the other, but the symptoms suggest the camera is not compliant to run out of the box using opencv in the way you want to.
You could try this 3rd party SDK instead to help verify.
I have no affiliation with them, but the ability to use their program for a (free) trial is very useful for helping to troubleshoot this issue.
Best of luck with getting your camera to work.
Maybe this will help, the official documentation states:
Sometimes, cap may not have initialized the capture. In that case,
this code shows error. You can check whether it is initialized or not
by the method cap.isOpened(). If it is True, OK. Otherwise open it
using cap.open().
I'm currently at a crossroads. I'm somewhat versed in Python (2.7) and would really like to start getting into GUI to give my (although mini) projects some more depth and versibility.
For the most part, my scripts don't use anything graphical so this is the first time I'm dipping my toes in this water.
That said, I've tried using pygame and tkinter but seem to fail at every turn to get something up and running (although I had some slight success with pygame)
Am I correct to understand that for both I need X started in order to generate any type of interface, and with that, so I need X to get any type of input (touchscreen presses)?
Thanks in advance!
In order to use tkinter, you must have a graphics system running. For Windows and OSX that simply means you need to be logged in (ie: can't run as a service). For linux and other unix-like systems that means that you must have X running.
Neither tkinter nor any of the other common GUI toolkits will write directly to the screen.
I'm gonna give an alternative answer. If you know HTML, CSS and Javascript (or have time to give it a try) I would recommend using Flask, http://flask.pocoo.org/.
With flask you can create websites but you can also (as I am using it) let it be your GUI. It will work on any device and looks really good :).
I read quite a few articels that say that the power led is now hardwired on
a raspy 3 device but some say it is somehow possible (but do not give specific
answers).
My question(s):
1.) is it possible to control the led via python and how.
2.) if not then can I permanently disable it?
The power LED is now also acting as a low-voltage indicator now. It is possible (however not trivial) to use it as an output but then the low-voltage indicaton is not working anymore. If I understand it correctly, the devs need to come up with a solution, so not much "normal" users can do for now.
There is an open issue on their bugtracker where you can get a bit more info: https://github.com/raspberrypi/linux/issues/1332
In general, as soon as the devs make it possible to control the power LED, there should be a file named /boot/overlays/pi3-pwr-led.dtbo. Currently, there isn't.
You can also have a look at one of the bare-metal environments and see if they have come up with a work-around.
https://github.com/rsta2/circle
https://github.com/vanvught/rpidmx512
So, I have looked around Google, and here, I do get some interesting results, like using Tkinter and some example from YouTube videos, but I don't think I am asking the right question.
Basically, I want to create a GUI, in Python, and I want to be able to use the standard Windows drop-down menu. By this I mean; File, Edit, Help, Etc. Is there some sort of template to create this or do I need to create my own, using button configurations?
I am assuming I am missing a large portion of information, specifically relating to Windows manipulation, in my studies so far.
You are looking for a GUI framework, there are several to choose from but personally I would say the main ones are:
Tkinter comes with python so nothing to download, looks "unixy"
QT & pyQT very powerful, cross platform, big downloads, always looks QT
wxPython Uses wrappers around native controls so small, fast, cross platform, looks native. Especially download & install the documents & examples package - gives you lots of code examples in the searchable demo that you can edit and run within the demo.
I really should mention that my personal favorite is wxPython, as I have used it a lot over the years.
I would like to know if there are any API's for python to programmatically control a phone, like starting and ending calls, but also to record conversations.
I would also like to use the Headphones and Mic of the computer to talk over the phone.
Any info would be great, I tried googling for something, but nothing useful came up.
Be careful when using PyBluez! The results will actually depend on the BT-USB dongle you are using. Depending on the hardware(the BT chip in there), PyBluez will use one or another BT stack - for example there was one from WIDCOMM. Results will vary, as PyBluez is actually wrapping around those stacks - all of which are far from complete.
So, when you have a working project, be sure to know what actual BT stack you were using :)
For Python audio stuff, you could try this.
PyBluez is an effort to create python wrappers around system Bluetooth resources to allow Python developers to easily and quickly create Bluetooth applications.
Unfortunately I've not found a page dedicated to its features, but it could be a good starting point, whether everything you need is in its feature set, or if you could build your application upon it by extending it.
http://code.google.com/p/pybluez/