Recent Posts

Pages: 1 ... 7 8 [9] 10
81
Sensors / Re: Balancing with Piezo as se...
Last post by JoshNZ - Today at 12:00 am
I agree it would, but I don't have one right now and it's not the sort of problem I'd buy one for. More of a hack project at this point. I think I will just attach it straight to the hub and gingerly bring it up to speed, see what I'm getting on the pin, if it's too much I'll know it needs a resistor.
82
Here's some 3D printed legs I am working on. Shame I can't embed the youtube vid, but here is the link:
https://www.youtube.com/watch?v=AnKWSwx22Us&feature=youtu.be

I'm trying to avoid using servos and all pre-made code/parts/systems etc as I am trying to build a much lower cost system for robotics. I believe that the current obsession with the most expensive servos and controllers is a problem. Robotics shouldn't just be for 40+ IT professional blokes.

These legs with the motors, drivers, rotary encoder sensors and Mega 2560 (clone) comes in at around £30.

 As you can see, it's in the very early stages. I am basically trying to make a complex biped similar to NAO, Darwin, etc, for below £100. I reckon it's possible for £60.

I've written an arduino code that remember positions and recalls them when a number is entered into the serial, but now I need to write one that replays those positions over in sequences so I can form complex movements.

Will post some updates when I've got it walking!

Let me know what you think!
83
Deutsch / Re: IDE 1.6.2 keine Umlaute me...
Last post by skorpi08 - Mar 30, 2015, 11:59 pm
bei 1.6.0 und 1.6.1 gehts noch, 1.6.2 nicht mehr.
Habs unter OSX 10.10.2
Dachte vielleicht gibts bei Einstellungen was zum einstellen, nix.
84
To get the right bootloader I would start with the an existing 8MHz ATmega168 model (like the Pro Mini) and modify from there:
atmega168a.name=ATmega168A-PU on a breadboard (8 Mhz)

atmega168a.upload.tool=avrdude
atmega168a.upload.protocol=arduino

atmega168a.bootloader.tool=avrdude
atmega168a.bootloader.unlock_bits=0x3F
atmega168a.bootloader.lock_bits=0x0F

atmega168a.build.board=AVR_PRO
atmega168a.build.core=arduino:arduino
atmega168a.build.variant=arduino:standard

atmega168a.upload.maximum_size=14336
atmega168a.upload.maximum_data_size=1024
atmega168a.upload.speed=19200

atmega168a.bootloader.low_fuses=0xc6
atmega168a.bootloader.high_fuses=0xdd
atmega168a.bootloader.extended_fuses=0x00
atmega168a.bootloader.file=atmega/ATmegaBOOT_168_pro_8MHz.hex

atmega168a.build.mcu=atmega168a
atmega168a.build.f_cpu=8000000L
85
This is how I have the mosfet connected
86
Arduino Due / Re: View images from SD card o...
Last post by rowboteer - Mar 30, 2015, 11:55 pm
Is there a faster SD card library available for the Arduino Mega as that seems to be the limiting factor for transferring images to a TFT.

I can clear the screen of a 480x320 TFT (HX8357 driver) using a Mega and 16 bit parallel interface in 84ms, but loading a 480x320 BMP file (24bit) takes 2.1 seconds, most of the time being spent accessing the SD Card :-(

I could port the image to 16 bit 565 RGB format which would bring the draw time down to about 1.4s.

SdInfo reports 480kB/s, viz 2us per byte which I guess is the best a standard Arduino can do. So the limit will be about 1s to draw a 480 x 320 16bit format image for the humble Mega?
87
Microcontrollers / DO NOT USE 1.6.2
Last post by rogerClark - Mar 30, 2015, 11:55 pm
Do not use 1.6.2

Latest version of 1.6.2 does not package the ARM compilor in the same location as previous versions

So my repo no longer works.

Arrggg!

I will investigate and report back


Edit

They have decided to hide it all away in the APPData folder

C:\Users\rclark\AppData\Roaming\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++


On windows to see where they've put stuff

Go to the search box by the Start button and type

%Appdata%/Arduino15


It will open a window

all the files are now in here

Edit.

I can fix it for 1.6.2 but will need to give instructions that Due needs to be downloaded, or I will have to put the Arm compilor in my repo

new recipe path is

{runtime.tools.arm-none-eabi-gcc.path}/bin/

88
Software / Instalación 1.0.6
Last post by madeskjet - Mar 30, 2015, 11:55 pm
Hola!

Tengo instalado la versión 1.0.5 pero para actualizar en Ubuntu 14.04, ¿Cuál es el método?
He leído unos pocos tutoriales pero no me despejan la duda  :smiley-eek-blue:

Gracias por adelantado.
89
Programming Questions / Re: Pool automation UDP comman...
Last post by SurferTim - Mar 30, 2015, 11:55 pm
In addition to PaulS, have you tested each of the parts of your code separately? Is it the serial interface to the pool or the UDP part that doesn't work?
90
Programming Questions / TimerOne Behavior
Last post by Dr_Rockzo - Mar 30, 2015, 11:54 pm
Hi All,

I am trying to decode a 16-bit Manchester encoded packet and after a rough start, I found an application note from Microchip describing how to use an interrupt and a timer to decode it; the basic idea is to trigger the timer in the middle of the bit and then when the timer triggers check the input pin's level. Figure 13 on page 8 shows what I mean: Microchip AN


The way my code should work is as follows (code posted at bottom):
1. Manchester signal arrives on Pin3 triggering the "DALI_change" ISR (pin change type)
2. TimerOne starts, period is about 625uS
3. When the TimerOne triggers, we check Pin3 and record its value.
4. This repeats 16 times
5. Decoded data is sent out via Serial, later PWM values will be assigned to pin instead.

However when I run the code, it appears that TimerOne fires as soon as it is started and the data sent out is over serial "0101010101010101" every time. I can put my scope on the data pin and am sure that is not the correct data; it should be something like 0000000100000101 depending on the button pressed.

So I guess my questions are:
Am I using TimerOne correctly?
Am I using the ISR(s) the wrong way?
As a novice, have I missed something common?



Thanks for the help!

Code: [Select]

#include <TimerOne.h>

//libraries 




//varibles
#define DALIpin 3// must match ISR if not using Teensy3.1, Pin 3 is INT 1 on MEGA2560
unsigned int bitTime = 833; // bit time in microseconds


volatile byte currentBit = 0;
volatile word DALIpacket = 0;
volatile byte bitCount = 0;
volatile boolean newData = false;
boolean newPacket = false;



void setup()
{
 pinMode(10, OUTPUT);
 attachInterrupt(1, DALI_change, CHANGE); //setup pin change interrupt
 pinMode(DALIpin, INPUT); //set DALIpin as input
 
 Serial.begin(115200);
 
 bitTime = (3*bitTime)/4; //testing needs to occur at 3/4 bit time
 Timer1.initialize(bitTime); //setup timer
 Timer1.attachInterrupt(DALI_test);
}

void loop()
{
 packetUpdate();
 serialOut(); 
}

/////////////////
void DALI_change() //when ever the pin changes, reset the timer
{
 Timer1.restart(); //WHEN THIS TIMES OUT RUNS DALI_test
}

/////////////////
void DALI_test()
{
 currentBit = digitalRead(DALIpin);
 Timer1.stop();
 newData = true;
}
 
/////////////////
void packetUpdate()
{
 if(newData == false) //check for new data, return if none
   {
    return;
   }
 
 else if(newData == true && bitCount == 16) // discard start bit
   {
    newData = false;
    bitCount--;
    return;
   }
 
 else if(newData == true && bitCount > 0 && bitCount < 16) // recieve bits 15-1
   {
    bitWrite(DALIpacket, bitCount, currentBit);
    newData = false;
    bitCount--;
    return;
   }
 
 else if(newData == true && bitCount == 0)//recieve bit 0 and reset counter, flag new packet
   {
    bitWrite(DALIpacket, bitCount, currentBit);
    newPacket = true;
    newData = false;
    bitCount = 16;
    return;
   }
}
   
void serialOut()
{
 if(newPacket == true)
   {
    newPacket = false;
    Serial.println(DALIpacket,BIN);
   }
}


Pages: 1 ... 7 8 [9] 10

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy