I have a working script for a uno3 that I have developed which involves reading 4 channels from an RC receiver, and then triggering a number of relays and working a servo.
• Pin A0 reads a sensor
• Pins 2,3,4,5 read from the RC receiver
• Pins 6-12 and A1 trigger relays which respond to ‘low.’
• Pin 13, connected to a servo
I want this now to work on a pro micro and have it connected and it works with the blink sketch. That is all good.
Clearly there are differences in pins so I have reconnected them as you will see in te code attached.
• A0, or 18, reads a sensor
• Pins 2,3,4,5 read from the RC receiver
• Pins 6, 7, 8, 9, 10, 16, and 14 trigger relays which respond to ‘low.’
• Pin 15, connected to a servo
The first issue is that when I try to serial print from 2-5 I am getting 0. The one I am using in 'unballastin.' There is not signal showing. Of course nothing is therefore working. I guess this is the startingpoint.
I have attached the sketch. (Sorry it is so long..) I have annotated where the changes are to the pins.
Any help would be apprecaited. Have been searching for advice without success
Any help would be appreciated. Have been searching for advice without success
John
There is a significant amount of work in your UNO sketch. Rather than fighting pinchange interrupts, port differences, timing and pinmapping, etc... We could try and understand the intellectual issues within the Arduino core and adapt the sketch ...
Is a Pro Mini not adequate? These are available for the same low-volume price as 328P-PU bare chips.
Were it me, I would just move my UNO design to a 328P-PU board design of my own. Yes, it will be a little larger because of the PDIP. I've done this on several projects: Prototypes
Hi
Visited the link. Are you really saying that despite advertising the Pro micro controller is not compatable. I am pretty outraged by this. There were no warnings like.. 'By the way you will have to rewrite your uno sketch if you want it to work on this platform.' No, just the oppostite, and I bought 2!
This whole world of micro processing is so full of pitfalls!
I should add I also have an Arduino Pro Mini that does not connect no matter how hard I try. I also bought 3 Compatible Nano V3.0 - ATmega328 Mini USB Controller Boards but none had bootloaders on them, I htink, so they wouldn't work.
Johnredearth:
Visited the link. Are you really saying that despite advertising the Pro micro controller is not compatible.
"Compatible"?
Didn't notice this before in your post, but a Pro Micro is a miniature version of the Leonardo, not a UNO. The processor is different. It does not in itself do things differently, but the peripherals are somewhat different including USB hardware, so the parts of your code or connections that depend on particular peripheral behaviour - such as the I2C interface - need to be arranged differently.
A miniature UNO (actually, a Duemilanove) is a Nano, so yours should be suitable. Get them going. If you seriously believe the bootloader is not present, then you need to use the "UNO as ISP" to sort that out.
The nano's I had I sold off on ebay as I spent days it seemed fruitlessly trying to get them going, but they were clones. I had lost of forum requests for help, but realised at the end I just couldn't do it, and at someones suggestion went for the micro. I guess you are saying buy a nano from arduino. I will happily do that to solve the problem and put the rest down to a learning experience.
Johnredearth:
Hi
Visited the link. Are you really saying that despite advertising the Pro micro controller is not compatable. I am pretty outraged by this. There were no warnings like.. 'By the way you will have to rewrite your uno sketch if you want it to work on this platform.' No, just the oppostite, and I bought 2!
This whole world of micro processing is so full of pitfalls!
John
Pro Micro (by Sparkfun) is based on the 32U4 AVR chip which is utilized in the Leonardo design. As such, the AVR 328P used by UNO and Pro Mini is simply a different chip than the 32U4 and the USB-serial is radically different in implementation (UNO using a separate uC and the ProMicro using LUFA as a software stack sitting on the 32U4 hardware USB internal module.)
I have a box of Chinese clone Pro Micros here that I utilized in projects that need to have a USB jack and mostly outbound USB-serial connectivity. But, the boards do differ significantly from the UNO in that they have 2.5K of SRAM rather than the 2K of the UNO or Pro Mini. The uC also have a different silicon die and identification number used by AVRDUDE. You can lighten this to a notebook using a Pentium3 and a desktop using a Pentium5... the CPU are suppose to be identical but only at the instruction level.
You may wish to try the Chinese Clone Pro Mini in place of the UNO. I have done this in a number of small projects and have not had any issues. I have used this one previously in numerous designs. Of course, even with a reputable dealer - ordering from China does impose delays and the occasional lost package - and while I suspect it will function as you need, I cannot guarantee that it will.
I should add I also have an Arduino Pro Mini that does not connect no matter how hard I try. I also bought 3 Compatible Nano V3.0 - ATmega328 Mini USB Controller Boards but none had bootloaders on them, I htink, so they wouldn't work.
I can, however, guarantee that the 328P-PU on an UNO and a 328P-PU on a homemade bareboard will function identically at the chip level. One still has to understand that power needs to be bypassed, Reset needs a pullup resistor, etc. If you go the bareboard route, most everything is in one place on Nick's site.
I guess you are saying buy a nano from arduino. I will happily do that to solve the problem and put the rest down to a learning experience.
Nano's work great, just remembering you are powering the FTDI chip all the time, so in low-power situations you need to account for the power drain.
One issue that will be important for me is that I will need to tweak the sketch once it is all installed in the boat. To do that I htink it would be best to have a usb interface that is easily accessable. In fact it will be a work in progress for a little while.
Frm what you are saying, and to be safe, I htink I need a nano from arduino. (No clones)
One issue that will be important for me is that I will need to tweak the sketch once it is all installed in the boat. To do that I htink it would be best to have a usb interface that is easily accessable. In fact it will be a work in progress for a little while.
Frm what you are saying, and to be safe, I htink I need a nano from arduino. (No clones)
Do you agree?
John
I do not disagree. I've been at this for years and feel confident in hiking off the beaten-path on projects - however, my confidence cannot be put into a jar and sold. The USB interface is certainly one way to reprogram an Arduino; another, would be the ISP interface. I've even seen some cleaver implementation of BlueTooth enabled reprogramming. But you should stay in your comfort zone and not branch out after a project has been coded. Branch out on a new, low profile project as there is much less to lose.