I have Arduino Uno that is working well.
I just got Arduino nano, 328P, with CH340G chip.
When I plug it into Win7, 64 bit, I can see that USB2-serial is recognized, without drivers.
But there is no COM port appearing in the COMs sub-menu.
I also tried to update drivers, linking to the Arduino installation drivers folder. It didn't recognize.
Real Arduino's do not use CH430G, they use FT232 (Duemilamove,Nano), or a 8U2 or 16U2 programmed as USB/Serial chip. Or use 32U4 which connects to USB directly.
Clones (boards claiming to be Arduino compatible) and counterfeits (boards claiming to be Arduinos) may use other USB/Serial chips, such as CH430G. You need to find that driver. Probably there is a link at the board suppliers website.
OK, I get it now.
You are talking about the chip, I was thinking of the board.
So in my case, I have the 328P and the intermediate CH340G, so it should connect directly to the USB.
Back to my starting point:
I tried the same clone on a fresh install of Win7, and it could recognize the CH340G, install Windows driver and successfully upload. So it looks good. I will connect soon some HW, to make sure it really works.
I still need to find drivers for my Ubuntu, and find out why it could work with fresh install and not with a working Win 7.
yigalb:
I still need to find drivers for my Ubuntu, and find out why it could work with fresh install and not with a working Win 7.
ch340 should work out of the box with a recent linux-kernel. After connecting, the serial device should be mapped to something like /dev/ttyUSBx . If you want to use it whitout root-permissions, you need to add your user to the group dialout, with a command like 'sudo adduser yourusername dialout' you cand do thath via terminal. If it dont gets recognized, you should check logs like /var/log/messages and dmesg, but this should not be nescesary in most cases.
Its even possible to talk to the chip directly with a python script or something like that in the userland via libusb (aka raw usb). Compared to other chips its relatively easy to implement this for a ch34x. This should work on windows and mac too and is imho the way to go if you are planning to build a device which depends on a host and you want to distribute it. There is some code around for this but still it requires some knowledge and a lot of time and might be overkill for a small private project.
eni23:
ch340 should work out of the box with a recent linux-kernel. After connecting, the serial device should be mapped to something like /dev/ttyUSBx . If you want to use it whitout root-permissions, you need to add your user to the group dialout, with a command like 'sudo adduser yourusername dialout' you cand do thath via terminal. If it dont gets recognized, you should check logs like /var/log/messages and dmesg, but this should not be nescesary in most cases.
Its even possible to talk to the chip directly with a python script or something like that in the userland via libusb (aka raw usb). Compared to other chips its relatively easy to implement this for a ch34x. This should work on windows and mac too and is imho the way to go if you are planning to build a device which depends on a host and you want to distribute it. There is some code around for this but still it requires some knowledge and a lot of time and might be overkill for a small private project.
Thanks!
I will try what you suggested, but I want to focus first on the Python part since you mentioned it.
I just learned Python at Windows environment, and I plan to start using it with my Ubuntu. Could you suggest an easy to use and learn IDE for Ubuntu?
My main target is to teach both domains (Arduino & Python), so the environment should be easy to use.
yigalb:
Could you suggest an easy to use and learn IDE for Ubuntu?
Im not a big friend of IDEs and using VIM for coding. I would suggest Geany, its lightweight, in the Ubuntu-Repos and has a lot of great Feautures. Or Sublime, but its not free. There are a lot of IDEs for Python: IntegratedDevelopmentEnvironments - Python Wiki mabye another one fits your needs better. Or just teach VIM, its not really easy to use and learn, but a must-have skill in professional linux enviroments.
Actually, I know VI for years and it is my favorite editor at Linux.
But I am not sure how it answers the debug phase: how can I see values of variables as they go, set breakpoints, etc.
print is your debugger in Python.
Python interpreted language, a workflow with breakpoins, vardump and all that tools from a compiled language does not really make sense. When you want to know a value of a variable, just print it in your script. Debugging in Python normally means to isolate the Problem to some lines of code and then testing until it works as expected.
But there are python-debuggers, for example pdb. Normally those debuggers are only used in hughe projects where isolating code is not possible.
Mabye this helps you: http://www.tp.umu.se/~nylen/pylect/advanced/debugging/index.html