Show Posts
Pages: [1] 2
1  Products / Arduino Due / Re: Due not detected via USB on: May 11, 2013, 03:05:53 am
I have the same problem, the suggested fix didn't work for me.
No? Are you sure you connected the NATIVE port? (Not the programming one) Did you press the both buttpns correctly at the same time?

Yes, I did exactly as recommended, the board appears not to work.
I played around with it a little using my AVR ISP Mk2 and the chip seems fine (the 16u2) and yet the computer doesn't detect it, the only reason I can see for it not working is if the board is faulty so I'm going to get it swapped for a new one.
That chip is not important! That one will work always. The programming port should be recognized. It's all about the sam3x chip.

Yes I know, the port SHOULD be recognised. If it isn't recognised by the computer AT ALL that must be a faulty board, right?
2  Products / Arduino Due / Re: Due not detected via USB on: May 10, 2013, 04:28:17 pm
I have the same problem, the suggested fix didn't work for me.
No? Are you sure you connected the NATIVE port? (Not the programming one) Did you press the both buttpns correctly at the same time?

Yes, I did exactly as recommended, the board appears not to work.
I played around with it a little using my AVR ISP Mk2 and the chip seems fine (the 16u2) and yet the computer doesn't detect it, the only reason I can see for it not working is if the board is faulty so I'm going to get it swapped for a new one.
3  Products / Arduino Due / Re: Due not detected via USB on: May 10, 2013, 11:23:49 am
I have the same problem, the suggested fix didn't work for me.
4  Using Arduino / Project Guidance / Re: How to find average colour of television on: August 22, 2012, 05:32:30 am
Quote
I have managed to dig up a camera with a composite video output, it's a long shot but is there any way to get an average colour from this?
With an appropriate decoder (PAL/NTSC/SECAM/whatever), yes, this can be done.
And where will I find a decoder that can do this (It should be PAL)?
5  Using Arduino / Project Guidance / Re: How to find average colour of television on: August 22, 2012, 05:26:53 am
Thanks for the suggestions, there is no output on the TV that can give me the picture regardless of source.
I suppose a colour sensor would be fine if it will work, positioning it where it won't get in the way should be easy enough anyone tried this before?
I have managed to dig up a camera with a composite video output, it's a long shot but is there any way to get an average colour from this?
Thanks.
6  Using Arduino / Project Guidance / How to find average colour of television on: August 22, 2012, 02:39:25 am
I am about to try and make a project that finds the average colour of a television to control some rgb leds.
the signal to the TV could be from any source, maybe even an internal one and so connecting to a video output isn't an option. (It probably wouldn't be easy anyway)

I was thinking maybe a small cheap camera or perhaps a colour sensor, I'm not sure which one will work best and so wanted someone else's opinion before I go buy anything.

Is this project feasible?

Thanks, Dan.
7  Using Arduino / Programming Questions / Re: Function returning fixed size array (coordinates) - How? on: June 13, 2011, 08:14:20 am
@djabailey: Just because something compiles does not mean it is a good idea; returning a pointer to an automatic variable is ALWAYS a bad idea.

I suppose this is true but all you would need to do to solve that problem is allocate the memory manually with malloc();. (and free it later)

If it was done this way then you would need no variable definitions outside of the function.
Edit: I thought the result was somewhere else, nvm.
8  Using Arduino / Programming Questions / Re: Function returning fixed size array (coordinates) - How? on: June 13, 2011, 08:02:10 am
the return value of your function is Float, you are trying to give it a float array

you cannot return an array from a function easily in c so the solution is to return a pointer to the array like so... (just add a star to the return value and return the address of the result)

(i haven't tested this to see if it will compile)

Code:

float* ChToCoord (int ChA_T, int ChB_T, int ChA_S, int ChB_S, int ChA_Z, int ChB_Z)
{
  float coord[3];
  //Here comes the math part
 //Generating result
  coord[0] = x;
  coord[1] = y;
  coord[2] = z;
  return (float*) &coord;
}


To get a value you should use something like this

Code:

float* myXYZ = ChToCoord (1,2,3,4,5,6);
(float) myXYZ[0]; //will get x

9  Community / Exhibition / Gallery / RepRap mendel control panel nearly finished on: June 13, 2011, 04:24:37 am
Hello, I thought I'd share some photos of the RepRap control panel that I have made recently, if anyone's interested?

The camera can't take very good photos up close so some photos are a little dodgy but I've done my best.

Here is a picture of the RepRap, you can also see the control panel in the front and the power supply to the right (just behind the HUGE mess of wires).



This is the Control panel itself, you may notice that the LCD is higher at the front, I don't know how it happened  smiley-confuse.



This is the back of the Control Panel, the green screw terminals control the heated bed circuit and receive readings for temperature while the thick white cable is used to send commands to my Generation 6 board via i2c, the i2c isn't used on the Gen 6 by default so I had to modify the firmware, this meant that now it will only use the i2c commands and will not listen to the USB, all commands from the computer now go through the control panel. There is also a connector for power to the reprap and one to reset it if needed.



This is it powered on, the Reset button lights up to tell you that it is on, I did try to get the text in focus but the camera isn't great so it would have taken a while.



Out of focus again but this is the 'Missile switch' that switches on the entire machine and control panel.



This is the side with the USB port. (wow, the focus is really bad on this one  smiley-eek)



here is a better photo of the text, the colour is washed out by the flash on the camera.



And last but not least, the Heated Bed Control Board, I would have put this inside the box but it was getting short of space.
The thick green wires go to the bed, it gets power from the ATX power supply and it has the resistors for the thermistors. (That relay makes a good satisfying click  smiley-lol)



Inside the box is an Arduino Mega, it controls the LCD, heated bed and the RepRap all at the same time, when I get the time I am going to add an SD card slot to print things from SD without a computer. While making this I accidentally made a very simple, small yet sophisticated menu system for my LCD (20x4 chars), if anyone wants to check it out then I'll post the code here.

Hope you all like it, it took me a while to make.

Thanks for all your help when making this. smiley-wink
10  Using Arduino / Project Guidance / Re: Vin power and usb Arduino mega on: May 22, 2011, 08:55:52 am
Thanks for the quick response, just out of curiosity, how does it decide? closest to 5v? or is it just that it'll only use USB if nothing else is available?
11  Using Arduino / Project Guidance / Vin power and usb Arduino mega on: May 22, 2011, 07:43:39 am
I know this has been asked before but I couldn't seem to find a single yes or no answer to this question:

Is it safe to have USB connected and have +12v connected to the Vin pin on an arduino? (Specifically the Arduino mega 1280)

I need to be able to have the USB optional.

Thanks, Dan

(btw, I got the i2c figured out if anyone was wondering  smiley, this is all going towards an awesome RepRap control panel)
12  Using Arduino / Networking, Protocols, and Devices / Re: Sanguino i2c to arduino mega i2c on: May 12, 2011, 10:13:29 am
Quote
Serial is very timing-dependent (especially software serial which does bit-banging). I2C would be likely more reliable.

Agreed, is there a way to bit-bang I2C if I cannot use the hardware I2C? (to avoid dodgy serial bit-banging)
Or even better, how can I use the hardware I2C properly?
13  Using Arduino / Networking, Protocols, and Devices / Re: Sanguino i2c to arduino mega i2c on: May 11, 2011, 04:29:52 pm
I can only get data out of the reprap, my attempts to get it in have all failed, I just get random characters constantly from the test code on the RepRap

Code on RepRap (entire file is huge, only the important bits are shown):
Code:
#define CP_BAUD 9600
#define CP_RX 17 // SDA line (Red)
#define CP_TX 16 // SCL line (Yellow)

SoftwareSerial cpSerial(CP_RX,CP_TX);
pinMode(CP_TX, OUTPUT);
pinMode(CP_RX, INPUT);

cpSerial.begin(CP_BAUD);
cpSerial.println("start");

//...

char cpCmdIn;
cpCmdIn = cpSerial.read();
Serial.println(cpCmdIn);   

Code on Arduino:
Code:
void setup() {
  // initialize both serial ports:
  Serial.begin(9600);
  Serial1.begin(9600);
}

void loop() {
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.print(inByte, BYTE);
  }
  // read from port 0, send to port 1: 
  if (Serial.available()) {
    int inByte = Serial.read();
    Serial1.print(inByte, BYTE);
  } 
}
14  Using Arduino / Networking, Protocols, and Devices / Re: Sanguino i2c to arduino mega i2c on: May 11, 2011, 11:09:47 am
Quick update, I have managed to establish communication with the Reprap via SoftwareSerial on the Gen6.
15  Using Arduino / Networking, Protocols, and Devices / Re: Sanguino i2c to arduino mega i2c on: May 11, 2011, 10:37:27 am
Quote
And posts like this:

Quote
I have tried using the "wire.h" library in this code but it doesn't seem to work ...

... have very little information in them. What was your code? In what way didn't it (seem to) work? Compiler error? Runtime error? No communication? Rule #1 is to explain what "doesn't work" means. Then post your code. Then post your wiring. I2C is inbuilt into the Atmega processors. It will work if used properly.

The Wire library will compile and upload to the Sanguino, If I use exactly the same code on an arduino and a Sanguino (the code is from the examples that come with the wire library) then the arduino prints to the serial whatever comes through The I2C (in this case another arduino with Wire sample code), the Sanguino however prints nothing to the serial when I send things down the I2C with another arduino.
Pages: [1] 2