Show Posts
Pages: [1] 2 3 ... 26
1  Products / Arduino Due / Re: Lights for ON and L dim and fade out when I connect 3.3V to rails on: March 27, 2014, 07:18:51 pm
http://arduino.cc/en/Main/ArduinoBoardDue

 Says about powering the board .

5V. This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.
2  Products / Arduino Due / Re: Storing data on Arduino DUE on: March 22, 2014, 06:21:33 am
What about storing it to a SPI mass storage device , or SD card which it`s normally called.
3  Products / Arduino Due / Re: Storing data on Arduino DUE on: March 20, 2014, 02:28:37 pm
Did you read the bit where it says :- 96 KBytes of SRAM
That means that the Due as most ram than most Arduino have flash / eeprom / sram put together.
o.k 96k of ram , 5 seconds , 4 sensors
4 sensors at 32 bits each ( 4 bytes )  4 * 4 = 16 byte
96k and say 80k usable ? ( 80 * 1024 )  / 16 = 5120 * 5 seconds  = 25600 seconds of 4 sensor data.
25600 / 60 / 60 about 7 hours of data , without storing it , And you can double that for you only need 16 bit per cell .
4  Products / Arduino Due / Re: Remotely download programs over ethernet on Due on: March 19, 2014, 06:26:59 am
Read this :-

http://forum.arduino.cc/index.php/topic,128913.0.html
5  Products / Arduino Due / Re: Remotely download programs over ethernet on Due on: March 18, 2014, 09:31:25 am
I can`t see how this could be done , with the standard bootloader!!!

To install a new program you need to completely erase the old code and add the new code, But the problem is that the ethernet shield need libraries for it to operate , and I don`t think the standard due bootloader can control the ethernet shield, I think it is only designed to update the code via USB , so without a special bootloader designed to update via the ethernet shield I can`t see how this could be done.
6  Products / Arduino Due / Re: i2c + DUE don't talk!! on: March 17, 2014, 05:25:48 pm
When I was using the Uno I had a alternative I2c library for avr chips, But I guess that is the problem with arm based arduino`s limited libraries.   
7  Products / Arduino Due / Re: i2c + DUE don't talk!! on: March 17, 2014, 11:40:55 am
I2C works with me , unless you need to use the error returns form Wire.endTransmission(), But the main part works .
8  Using Arduino / Networking, Protocols, and Devices / Re: New XBEE WiFi modules on: July 31, 2011, 07:43:02 am
wow , that could be a nice little add on for the people who already have xbee shields.
9  Using Arduino / Networking, Protocols, and Devices / Re: I2c Slave mode. on: July 31, 2011, 07:36:41 am
Thanks , so only one Wire.send () , and hope the flyport does clock stretching , which I know it does because I had to make a mod for that to get it to read and write to eeproms.

Thanks again Peter
10  Using Arduino / Networking, Protocols, and Devices / Re: Long Range Communications on: July 31, 2011, 07:31:34 am
The problem is if you want to get 11km, no one can be on that frequency for around 30km2.

Because one point is north and the other point 11km south, they could be a stronger signal a little more to the north or one a little more to the south of you.

I was a radio ham and an 11km jump at 9k6 was not possible, to me the only way is by telephone ( Wifi ) or mobile phone.
I not sure about your country , but anything which would go that far would by licensed.
11  Using Arduino / Networking, Protocols, and Devices / Re: I2c Slave mode. on: July 30, 2011, 05:56:32 pm
Hi Nick, I`m using address 8 for the master on the flyport, so I do know about the shift.

I am triggering the requestEvent !!! , but like I said, I can`t use :-
start ( write address ) , send data , restart ( write address + 1 ) , read data , stop .

I`ve found I need to use :-

start ( write address ) , send data , stop , start ( write address + 1 ) , raed data , stop.
I also needed to add a couple of ms wait between the stop start. 

I`ve got it working now , I`ll see if it still working when I start adding code in requestEvent.

Quote
what it is sending or expecting to receive

I know how the program for the arduino better than for the pic chips , so I`m using it as a co-pro , plus move some load away from the flyport.

The flyport has zero documentation, so been able to use the arduino is a good fall back tool.
12  Using Arduino / Networking, Protocols, and Devices / Re: I2c Slave mode. on: July 30, 2011, 07:57:11 am
Hi Nick, oh yes I know that one, I don`t have a walk in wardrobes I have a walk in project bins.
A Morse key are a radio ham? .

I`m getting something back if I split the parts up with a long wait inbetween.
But very hit and miss .

My code is cut down , just for testing , so not a lot can go wrong

Code:
#include <Wire.h>

int cmd;
byte return_value = 0;

void setup()
{
  Wire.begin(4);                // join i2c bus with address #2
  Wire.onRequest(requestEvent); // register event
  Wire.onReceive(receiveEvent); // register event
  Serial.begin(9600);           // start serial for output
  
}

void loop()
{
  // check serial port etc
  delay(100);
}


// send a reply / data back to the master
void requestEvent()
{
  switch (cmd)
  {
    case 4:
    Wire.send("hello - cmd 4 ");
    break;
//
    default:
    Wire.send("DEFAULT ");
    break;
  }
}
// get some data from the master
void receiveEvent(int howMany)
{
  int counter = 0;
  return_value = 0;
  cmd = Wire.receive();

   switch (cmd)
  {
    case 2:
    break;
    case 3:
    break;
    case 4:
    break;    
    case 5:
    break;
    case 6:
    break;    
    case 7:
    break;
  }  
  
  
}
13  Using Arduino / Networking, Protocols, and Devices / Re: I2c Slave mode. on: July 29, 2011, 03:01:44 pm
Still not fully working.

I can sent it data and that work , I can get data from it.
but if I try to send it data , it will send data back.

14  Using Arduino / Networking, Protocols, and Devices / Re: I2c Slave mode. on: July 29, 2011, 06:08:08 am
Thanks wayneft , you are right.

The Arduino is a little non-standard, in that it doesn`t support the , Start , send data , restart + 1, read data , stop method. 
I have to make them two separate commands :-
start , send data , stop
start + 1 , read data , stop

thanks again peter
15  Using Arduino / Networking, Protocols, and Devices / Re: I2c Slave mode. on: July 29, 2011, 03:11:52 am
Quote
Also does your flyport give any type of return

No , but the library is just talking to the internal register , so If you know what you was doing  ( which I don`t ) I guess you could quickly make a new command to return any flag.

The is the flyport library for i2c .

Code:
/**
\defgroup I2C
@{
The I2C library allows the user to communicate with external devices with I2C bus, like flash memories or sensors. The Flyport is initialized as I2C master.
*/


 /**
 * I2CInit - Initializes the I2C module.
 * \param None
 * \return None
 */
void I2CInit(BYTE I2CSpeed)
{
TRISGbits.TRISG2 = 1;
TRISGbits.TRISG3 = 1;

I2C1TRN = 0x0000;
I2C1RCV = 0x0000;

I2C1BRG = I2CSpeed; // Set I2C module at 100 KHz
I2C1CON = 0x8200; // Configuration of module
}


 /**
 * I2CStart - Sends a start sequence on the bus.
 * \param None
 * \return None
 */
void I2CStart()
{
I2C1CONbits.SEN = 1; // Sends a start sequence on I2C bus
while(I2C1CONbits.SEN); // waits the end of start

}


 /**
 * I2CRestart - Sends a repeated start sequence on the bus .
 * \param None
 * \return None
 */
void I2CRestart()
{

I2C1CONbits.RSEN=1; // Sends a repeated start sequence
while(I2C1CONbits.RSEN); // waits the end of restart

}


 /**
 * I2CStop - Stops the trasmissions on the bus.
 * \param None
 * \return None
 */
void I2CStop()
{
I2C1CONbits.PEN=1; // Initiate a Stop condition on the bus
while(I2C1CONbits.PEN); // waits the end of stop
}


 /**
 * I2CWrite - writes one byte on the bus.
 * \param None
 * \return None
 */
void I2CWrite(BYTE data)
{
I2C1TRN = data; // Sends a byte on the bus

while(I2C1STATbits.TRSTAT || I2C1STATbits.TBF); // waits the end of trasmissions
// Idle
while(I2C1CONbits.SEN || I2C1CONbits.PEN || I2C1CONbits.RCEN || I2C1CONbits.RSEN || I2C1CONbits.ACKEN);

}


 /**
 * I2CRead - Reads one byte from the data bus .
 * \param None
 * \return None
 */
BYTE I2CRead(BYTE ack)
{
I2C1CONbits.RCEN=1; // Reads one byte from the bus
while(I2C1CONbits.RCEN); // waits the end of the read
I2C1STATbits.I2COV = 0; // Resets the overflow flag

I2C1CONbits.ACKDT = ack;
I2C1CONbits.ACKEN = 1; // Initiate an aknowledge sequence
while(I2C1CONbits.ACKEN);       // wait the end of the acknowledge sequence
return I2C1RCV; // Returns the byte
}
/*! @} */
Pages: [1] 2 3 ... 26