Show Posts
Pages: [1] 2 3 ... 10
1  Using Arduino / Interfacing w/ Software on the Computer / Re: Guidance to set parameters in Arduino on: July 28, 2013, 02:21:04 am
Hoestly- I am not too experienced in languages. I would search for tutorials and would try my best  smiley-sweat
2  Using Arduino / Interfacing w/ Software on the Computer / Re: Guidance to set parameters in Arduino on: July 20, 2013, 10:37:40 am
Hi,
I meant that I would like to have  recomandation in software to program the PC GUI.
3  Using Arduino / Interfacing w/ Software on the Computer / Guidance to set parameters in Arduino on: July 20, 2013, 01:42:54 am
Hi all,
I have some experience with Arduino projects but never connected the Arduino outside the normal programming surface.

What I am searching for my current project is a way to connect a PC with a an Arduino through USB in order to change a set of parameters (so not the software but just values in the EEPROM) of a given Arduino software by a programming surface. Important to me are just a few things:
1) Saving the parameters I read and wrote to the Arduino on the PC
2) Automatic COM port search to automatically log into Arduino without additional adjustments

I shuffled thorugh the Playground, but I cannot judge what is the best/ most simple solution for my usecase.

Can pls someone guide me to the right direction?


Thx!
4  Using Arduino / Project Guidance / Reading measruement data from Ethernet shield --> Graphical website on: March 18, 2013, 05:02:02 am
Hi,
I need some guidance how to readout measured data (.csv format?) from the SD card and show it on a website with a x-y diagram (this is long term data from three DHT11 sensors). I understand that the UNO is a little weak to do do fancy graphical stuff, but I can imagine that there is a SW out that can be on a Arduino hosted website. The website (including the SW) will be read by the PC and the generation of the chart is done by the  PC as well.

I googled for a while but did not find the right thing.

Can you pls guide me ?

5  Using Arduino / Project Guidance / Re: Measuring voltage over a resistor on: January 30, 2013, 07:07:25 am
Found a TI chip named INA200...need to order now
6  Using Arduino / Project Guidance / Re: Measuring voltage over a resistor on: January 29, 2013, 12:53:48 pm
Here you are
7  Using Arduino / Project Guidance / Re: Measuring voltage over a resistor on: January 29, 2013, 09:55:37 am
I'd like to measure that with the arduino.
8  Using Arduino / Project Guidance / Re: First Grade School Project on: January 29, 2013, 09:03:23 am
Hi,
welcome to the community.

What you want to do is a distance measurement to get something happening.

First you want to measure distance. May this chapter helps http://playground.arduino.cc//Main/InterfacingWithHardware#DistanceSensing

The you may want switch an existing unit that growls with a transistor. May this helps http://arduino.sundh.com/2011/10/transistor-controls-other-power-source/
You can use any Arduino for that job pending on how small the unit shall be. May the best is to buy a arduino uno with a prototype shield...that's always a good starter.
9  Using Arduino / Project Guidance / Measuring voltage over a resistor on: January 29, 2013, 08:53:08 am
Hi,
I would like to measure a voltage drop across a resistor. The voltage over that resistor is 0,7V to 1.4V although the voltage at the resistor can vary between 10 to 14V (that's why the voltage drop is so interesting).

How can I do that?
10  Topics / Science and Measurement / Re: Using COMPA and COMPB correctly on: December 28, 2012, 02:30:10 pm
Your code works! Jihaa!  smiley-mr-green

I tried several values and found a "base delay" of abput 12.5us meaning that there is no Interupt control below that. From that value on the control works , but I can live with that.

Thank you for your brilliant help!
11  Topics / Science and Measurement / Re: Using COMPA and COMPB correctly on: December 28, 2012, 04:49:56 am
Hi,
changed the code as proposed. There is "a" reaction to what I have written, but not as expected. The (red) Interrupt rising line is not very close to the (blue) trigger HIGH expected 20 ticks after. Changing the CompB from 100 to 10.000 (which is intended to increase pulseduration but keeping the rising edge at the same position) changes the rising edge position.
Here is the code and a oscilloscope screenshot (blue line is trigger and red line is interrupt reaction- time/ dev= 50mS):

Code:
#include <avr/io.h>
#include <avr/interrupt.h>
#define LEDPIN 13

void setup(){ 
  pinMode(LEDPIN, OUTPUT);
  cli();                    // disable global interrupts
  TIMSK1 |= (1 << OCIE1A);  // enable timer compare interrupt channel A:
  TIMSK1 |= (1 << OCIE1B);  // enable timer compare interrupt channel B:
//  TCCR1A = 0;               // set entire TCCR1A register to 0
  TCCR1A = B11110000;      //see table 16-1
  sei();                    // Enable global interrupts
  attachInterrupt(0, start, RISING);
}

void loop(){
 OCR1A = 20;            // COMPA
 OCR1B = 40;          // COMPB
}

void start(){
  //want to start/ restart the timer here
  TCCR1B |= (1 << CS10);    // prescaler 1- see table 16-5 and (re)start timer1
}

ISR(TIMER1_COMPA_vect){
  digitalWrite(LEDPIN, HIGH);
}

ISR(TIMER1_COMPB_vect){
  digitalWrite(LEDPIN, LOW);
  TCCR1B = 0;  //stop timer here
}
}
12  Topics / Science and Measurement / Re: Using COMPA and COMPB correctly on: December 23, 2012, 11:32:45 am
Hi,
the "attachInterrupt(0, start, RISING);" was a try to get the external interrupt running because I couldn't make it with real "C"  smiley-red . And the  ISR(EXT_INT0_vect) function is basically the double cover to the attachInterrupt...but both doesn't work... smiley-confuse

Quote
The code in the ISR looks like it stops the timer by setting the control registers to 0.
I wanted to put the counter at least to zero. I again read the datasheet and should have put a zero value to the TCNT1 register and not to TCCR1* control register , right?

Quote
Perhaps you should move the code that starts the timer into start() and call it from your external interrupt instead of from setup(). 
I did not know that I started the timer...I thought it would be running anyhow. How can I start and stop it?
13  Topics / Science and Measurement / Re: Using COMPA and COMPB correctly on: December 23, 2012, 04:16:15 am
Hi johnwasser,
I improved my sketch and the compA and compB are working. I let the LED on pin13 switch on (compA) and off (compB) which works well.

What is missing/ not working is:
- External interrupt on INT0 on rising flag
- this interrupt starts the timer1 starting at zero
- stopping the timer1 with compB

Is that possible?

Code:
// avr-libc library includes
#include <avr/io.h>
#include <avr/interrupt.h>
#define LEDPIN 13
// int timer;
// unsigned int counter;

void setup()
{
  Serial.begin(115200);
  pinMode(LEDPIN, OUTPUT);
  pinMode(2, INPUT);        // Enable Pin2 as input to interrupt

  cli();                    // disable global interrupts
  EIMSK |= (1 << INT0);     // Enable external interrupt INT0  (see table 13-2-2 in Atmel 328 spec)
  EICRA |= (1 << ISC00);    // Trigger INT0 on rising edge (see table 13-1 and 13-2 in Atmel 328 spec)
  EICRA |= (1 << ISC01);    // Trigger INT0 on rising edge (see table 13-1 and 13-2 in Atmel 328 spec)


    // set compare match register to desired timer count:
  OCR1A = 100;            // COMPA
  OCR1B = 50000;          // COMPB

  TCCR1B = 0;               // set entire  TCCR1B register to 0
  TCCR1B |= (1 << CS12);    // prescaler 256- see table 16-5

//***Not shiure if this is right...
  TCCR1A = 0;               // set entire TCCR1A register to 0
  TCCR1A |= (1 << COM1B0);    // Set OC1A/OC1B on Compare Match (Set output to high level).- see table 16-1
  TCCR1A |= (0 << COM1B1);    // Set OC1A/OC1B on Compare Match (Set output to high level).- see table 16-1
  TCCR1A |= (1 << COM1B0);    // Set OC1A/OC1B on Compare Match (Set output to high level).- see table 16-1
  TCCR1A |= (0 << COM1B1);    // Set OC1A/OC1B on Compare Match (Set output to high level).- see table 16-1
//***Not shiure if this is right...

 
  TIMSK1 |= (1 << OCIE1B);  // enable timer compare interrupt channel B:
  TIMSK1 |= (1 << OCIE1A);  // enable timer compare interrupt channel A:


  sei();                    // Enable global interrupts
  attachInterrupt(0, start, RISING);
}

void loop()
{
}

ISR(EXT_INT0_vect){   
//Reset Timer1
TCCR1A = 0;               // set entire TCCR1A register to 0
TCCR1B = 0;               // same for TCCR1B and setting timer1 to 0
}


void start()
{
//want to start the timer here

//TCNT1H=0; //To do a 16-bit write, the high byte must be written before the low byte
//TCNT1L=0; //To do a 16-bit write, the high byte must be written before the low byte

}

ISR(TIMER1_COMPA_vect){
  digitalWrite(LEDPIN, HIGH);
  Serial.println("NUN");
}

ISR(TIMER1_COMPB_vect){
  digitalWrite(LEDPIN, LOW);

 // digitalWrite(LEDPIN, !digitalRead(LEDPIN));
 Serial.println("AHA");
//want to stop the timer here
}
14  Using Arduino / Programming Questions / Re: Direct port manipulation using TIMER1 on: December 18, 2012, 01:20:07 pm
Hi dhenry- I am impressed. You got the failure. changeing the value to 50 gives an even result although it is niot accurate enough. I need to think ybout other solutions. This single PWM was intendet to be first out of 10 different PWMs.
15  Using Arduino / Programming Questions / Re: Direct port manipulation using TIMER1 on: December 18, 2012, 04:33:34 am
Has anyone tried this code on his Mega? I am still running out of ideas to get this idea running  smiley-sad-blue
Pages: [1] 2 3 ... 10