Show Posts
Pages: [1] 2 3 ... 12
1  Products / Arduino Due / Re: Audio (yes, I know) on: September 01, 2014, 03:13:35 am
It's not hanging, as a program it runs fine, just doesn't actually achieve what I require which is a reconstructable sound (or raw data) file.

Its running on an arduino due, so a cortex m3, which has 96KBytes SRAM.

So it runs fine, but doesn't work? That doesn't give us a lot to go on smiley

I suspect that you are trying to send too much data, and the loop is too slow to run at 8KHz.

But, let's break this down, do you get packets on the PC containing 8000 samples? Is it the right data? Are you losing packets? To test that, send dummy data, e.g. 0-255 repeated, with a sequence number at the start.

Is the line " Udp.print(outgoingAudio);" sending all the data? Check the result code.


2  Using Arduino / Project Guidance / Re: Preparing a RGB Matrix backpack which communicates with arduino.. on: September 01, 2014, 02:25:21 am
So,,you are saying that I should upload the hex file instead of uploading the bootloader.?Thank you very much for the reply..
Yes, that's right.
3  Using Arduino / Project Guidance / Re: Preparing a RGB Matrix backpack which communicates with arduino.. on: August 31, 2014, 02:15:23 pm
I want to prepare this RGB Backpack.'https://www.sparkfun.com/products/760' .I have the schematics.,,since I constructed this board,,the micro controller is totally new. There should be a firmware on the micro controller,,In this page 'https://www.sparkfun.com/tutorials/201' he said to upload a hex file i.e update the firmware on the RGB backpack .If I upload this hex file to a new micro controller,, will that work?If it works.,,How to upload this hex file to a totally new micro controller using arduino uno as ISP..Please help.

It's already linked in the page you quoted - https://learn.sparkfun.com/tutorials/installing-an-arduino-bootloader. But instead of programming the bootloader, you use the hex file for the backpack firmware.

You'll need an AVR programmer or an Arduino set up for ICSP.
4  Using Arduino / Project Guidance / Re: Save encoder data to control stepper on: August 31, 2014, 01:06:18 pm
Maybe Labview can do what I need regarding data capture of the encoder and scaling it?

It probably can, I've seen it but never used it. I would use C#, but I think it's a case of use whatever is familiar.

Btw I discovered this project Mini Coil Winder while looking for something else. I would have thought the demand for coil winders is pretty low but maybe I was wrong! Not sure what stuff he has in the black box, probably a PIC.
5  Using Arduino / Installation & Troubleshooting / Re: Marlin Ramps 1.4 Clay Delta upload problem on: August 30, 2014, 10:04:31 am
EXTRUDERS is defined in Configuration.h, so I can't see why that error would occur. Puzzling.
6  Using Arduino / Microcontrollers / Re: Using an ATtiny85 as SPI Slave on: August 30, 2014, 08:09:33 am
I2C has other problems, and is generally run slower than SPI, but works well on tiny85. I am actually using a tiny45 with 8MHZ internal clock for the OpenBlink (aka "BlinkM") type controllable LEDs, with cyz_rgb firmware.

A limitation of i2c is the number of addresses, unless we use 10 bit addresses, so I was thinking an SPI like protocol (two wire, no slave out) could be used. The WS2811 use one wire protocol, but with tight timing requirements.

Anyway, at about $1.50 or so per unit, the OpenBlink design is not cost-effective for lots of LEDS, I can get WS2812 LEDS for about 30c each, and a 328 can handle a long string of those.
7  Using Arduino / LEDs and Multiplexing / Re: Tileable Noise Function with dynamic period on: August 30, 2014, 05:16:25 am
Yeah, "Noise" in graphics is  a very confusing use of the term! It's really randomized textures, but I guess noise is quicker to say. It produces some impressive results though.

8  Using Arduino / Installation & Troubleshooting / Re: Marlin Ramps 1.4 Clay Delta upload problem on: August 29, 2014, 06:49:41 pm
Have you configured a display in configuration.h?
9  Using Arduino / LEDs and Multiplexing / Re: Tileable Noise Function with dynamic period on: August 29, 2014, 06:44:56 pm
Interesting, I will have to have a play with that! I am planning a cylindrical display.

As for the endpoints, I suggests generating n-1 points then interpolating point [n] as the average of [1] and [n-1].
10  Using Arduino / Programming Questions / Re: MersenneTwister.h Troubleshooting#size on: August 29, 2014, 05:01:46 pm
Do you think that I can change MersenneTwisterFast.h to use long instead of int?

I don't think so, at least not with that code - it is written for 32 bit integers.
11  Using Arduino / Project Guidance / Re: Save encoder data to control stepper on: August 29, 2014, 04:54:22 pm
What sort of resolution are you looking for ? The data rate is what makes the project feasible or not.

Capturing every pulse change and recording the time interval may not be possible on an Uno. I would guess that sampling the position about 100 times a second would reproduce the hand movement accurately enough?

I think for winding, the X axis does not move very quickly. Therefore I would sample the position at a fixed interval, eg. 100/sec. This would give a manageable 120kb of data over 10 minutes. (10*60*100*2 bytes).

If you have an incremental encoder, it produces two pulse outputs out of phase, so you can tell the direction. The Uno CPU does not have a hardware decoder, but it is easy enough to do with an interrupt on change. Each interrupt increments or decrements an internal counter. (The direction is determined by the state of the two encoder lines).

With a timer running at 10ms interval, the internal counter is sampled and written to a buffer. At 10ms rate, you would generate 200 bytes per second, so you could transfer that over serial to a PC. (Assuming 2 bytes per sample, +/-32767 counts).

To generate G-code from the data file, you would need to convert the count values to a position in mm, and the feedrate = dist moved/0.01 * 60 (mm/min).

If 10ms is not enough, you could probably go down to 1ms on an Uno before running into performance problems.

I think as a project it's quite doable, if you are realistic about data rates.
12  Using Arduino / Installation & Troubleshooting / Re: Marlin Ramps 1.4 Clay Delta upload problem on: August 29, 2014, 01:32:04 pm
Marlin includes the SdFat library in its source, you shouldn't need to install a library. So it is probably something else.

But there are hundreds of versions of Marlin, without knowing which source you have it's hard to tell. Posting the original error message would help as well.
13  Products / Arduino Due / Re: Reading Serial Flash Manufacture/Device ID via SPI.transfer on: August 29, 2014, 12:42:40 pm
Your SPI transaction looks good, except that the chip is not responding. Assuming that the clock speed is in spec, we are looking for a hardware problem om the Flash side.

Did you set HOLD and/or RESET  high?
14  Using Arduino / Project Guidance / Re: G Code on Arduino? on: August 29, 2014, 04:18:20 am
Since teacup has built-in code to take data from the serial port it may be possible to modify it so it could get that data from an SD card. The large SD Card data buffer may be a problem. If it worked other teacup users might appreciate your efforts.

SD Cards can be used without the FAT file system (and its large data buffer) but then you are into a very non-standard system.

There is a branch of Teacup with SD/FAT support, might be worth a try -  https://github.com/Traumflug/Teacup_Firmware/tree/sdcard

Probably still need modifying to automatically play/repeat a  file.
15  Using Arduino / Project Guidance / Re: G Code on Arduino? on: August 28, 2014, 06:26:48 pm
I've spent some time developing on teacup and other printer firmwares.

Teacup does not seem to support SD card, as that would be an easy way to inject G-code commands.

The next easiest is to inject characters in the main () function (file mendel.c). Currently it looks like this:

Code:
// if queue is full, no point in reading chars- host will just have to wait
if ((serial_rxchars() != 0) && (queue_full() == 0)) {
uint8_t c = serial_popchar();
gcode_parse_char(c);
}

if you add something like the following psuedocode :
Code:
  if queue is not full
        c = get next char from my buffer at next_ptr
       gcode_parse_char (c)
       next_ptr ++
       if next_ptr end of my buffer
           set next_ptr to 0
       endif
  endif

it will repeatedly run the built-in G-code commands.

You can store a "script" of G-code commands as a simple progmem array something like

Code:
PROGMEM char my_gcode [] = "G1 X10 Y10\nG1 X20 Y20\n G1 X0 y0\n";

next_ptr can just be an int, going from 0 to strlen(my_gcode).

If you want to get fancy you could add G-code commands to start/stop your script, run different scripts, react to buttons, etc.

There is a G4 command if you want to put pauses in to the script.
Pages: [1] 2 3 ... 12