Yes that is all you should need with the new nanos. The old ones didn't have a USB interface onboard and you needed a conversion. Only thing to watch out for is that chinese ones are pretty sketchy quality. But for $4 I will take the chance.
Anything that is arduino compatible should work just with a bit of messing about with the pins. I used a Teensy 2.0 in the original as it was what I had.
Joined: 08 Nov 2006
Posts: 1265
Location: Adelaide
I got the ARDUINO Compatible Nano V3.0B Module from MiniKits. Not quite the Chinese price but not too bad
Worked well in my experience and has survived two events controlling my pneumatic system. Only reason I went there was because they had a couple of IC I needed as well and ordered 2 weeks pre event so didn't want a long shipping time.
Given we are still a while off an event I would probably risk the cheap option because the simple fact they are in the bot means you might damage one due to the forces involved. Can always source another one if it does not work. The ones from Arduino themselves are just not worth the money in my opinion.
I have also been looking at the TI MSP430. My understanding is you can just buy a chip and flash it on the board then solder the chip into your own circuit. IDE and language is very similar to Arduino as well so porting code should be quite easy.
The chip is not quite as capable but we are not generally doing overly complex work. May not be worth it here as you only need 1 or 2 copies but for slightly higher production runs or people doing custom PCB it may be worth a consideration. _________________ Remember to trust me, I am an Engineer.
Joined: 06 Sep 2015
Posts: 304
Location: Adelaide, SA
Cheers guys, I ended up ordering two off ebay, one from an Aussie seller and one ultra cheap from a Chinese seller (eh, it's cheap, and this way I have a spare).
For my reference to be integrated into the first post.
code:
/*
Arduini Winch Thingy
*/
// Pin 11 has the LED on Teensy 2.0
// give it a name:
// Pin F5 ADC In
// Pin D1 RC In
// Pin B4 RC Out
int led = 11;
int rcIn = 6;
int rcOut = 13;
int potIn = 3;
int val;
int rcMin = 800;
int rcMax = 2200;
#include <Servo.h>
Servo myservo; // create servo object to control a servo
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output
pinMode(led, OUTPUT);
myservo.attach(rcOut);
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
int pulse = pulseIn(rcIn, HIGH,500000);
if (pulse > rcMin && pulse < rcMax){
val = analogRead(potIn); // reads the value of the potentiometer (value between 0 and 1023)
if (pulse < 1200 && val > 300){
myservo.writeMicroseconds(1000);
} else if (pulse > 1800 && val < 700){
myservo.writeMicroseconds(2000);
} else {
myservo.writeMicroseconds(1500);
}
// sets the servo position according to the scaled value
//Serial.println(pulse);
val = analogRead(potIn); // reads the value of the potentiometer (value between 0 and 1023)
// scale it to use it with the servo (value between 0 and 180)
}
Hmmm well that's messy. I will have to fix that up a little before I suggest you use it but as people are charging ahead though it would be good to post. _________________ Steven Martin
Twisted Constructions
http://www.botbitz.com
Sat Jun 18, 2016 12:46 am
evil_steve
Joined: 06 Sep 2015
Posts: 304
Location: Adelaide, SA
Sorry to be a pain, but any chance of a link to the mount for the pot? I'm hoping to get this done for Nationals and I'm going to have to ask someone nicely to print it for me.
Thu Jun 30, 2016 9:15 pm
Nick Experienced Roboteer
Joined: 16 Jun 2004
Posts: 11802
Location: Sydney, NSW
If you can wait a week or two, I can print it out in this very promising new material:
http://www.fennerdrives.com/ninjatek/_/ninjatek/armadillo/
. It is said to be 60% tougher than ABS and much easier to print. I have a reel on the way, just not sure when it will arrive. _________________ Australian 2015 Featherweight champion
UK 2016 Gladiator champion
Thu Jun 30, 2016 9:25 pm
evil_steve
Joined: 06 Sep 2015
Posts: 304
Location: Adelaide, SA
Wow, yeah, for that I can wait
Actually, if that prints well I may reconsider getting a Cocoon Create or similar instead of something more expensive and enclosed for ABS.
Thu Jun 30, 2016 10:36 pm
Nick Experienced Roboteer
Joined: 16 Jun 2004
Posts: 11802
Location: Sydney, NSW
I am just just typing a long post about that - stay tuned! _________________ Australian 2015 Featherweight champion
UK 2016 Gladiator champion
Joined: 06 Sep 2015
Posts: 304
Location: Adelaide, SA
That's understandable, I know the feeling. Thanks for posting the files, but I'm not sure I'll have the time/ability to sort out the winch wiring etc by Canberra.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum