Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 71
61  Using Arduino / Microcontrollers / Re: Uploading to Attiny with an Arduino on: February 22, 2014, 08:02:08 am
First you will have to install the specific files for the tiny, called a core.

I can recommend this one:

https://code.google.com/p/arduino-tiny/

As you see there is a version for either IDE version 1.0x or 1.5.x
Follow the read.me file when you install the files

Then you just follow these steps:

http://www.ernstc.dk/arduino/attiny85.html
62  Using Arduino / Microcontrollers / Re: SoftwareSerial with ATTiny84 using ATtiny library on: February 19, 2014, 09:17:37 am
I'm afraid that I am to blame for  the confusion.

I have corrected the pin names/numbers here

http://www.ernstc.dk/arduino/tinycom.html

You can use this reference sheet to see both digital and analog pinnumbers.

http://www.akafugu.jp/images/microcontroller-reference-sheet.png

For example physical pin 10 is digital 7 and analog 3
so:
digitalWrite(7,HIGH); will set physical pin 10 (or PA3) high
analogRead(3);  will read from physical pin 10 (or PA3)

BTW
PA3 is short for PortA pin3
63  Development / Other Hardware Development / Re: Can't upload to Iteaduino Lite on Linux/debian on: February 15, 2014, 07:03:46 am
My Iteaduino Lite worked out of the box.
I am on windows (Vista), if it can be of any help here is my verbose output:

Code:
avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "D:\arduino-1.0.4-windows\arduino-1.0.4\hardware/tools/avr/etc/avrdude.conf"

         Using Port                    : \\.\COM13
         Using Programmer              : arduino
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Recv: . [14]
avrdude: Recv: . [10]
         AVR Part                      : ATMEGA88
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :
64  Using Arduino / Microcontrollers / Re: ATtiny85 communication with other MC - Help with deciding on: February 14, 2014, 11:27:23 am
Quote
I don't think I'll be able to use serial easily as I need to communicate with another MCU.

I don't understand what yoym mean. Serial communication between MCU's are quite normal.
I have a ATtiny85 communicating with my Raspberry Pi via serial
65  Using Arduino / Microcontrollers / Re: ATtiny85 communication with other MC - Help with deciding on: February 14, 2014, 07:45:53 am
BTW I once made a simple freqence counter with an ATtiny85, using PCINT
I don't rember the upper freqence limit

Code:
volatile unsigned long Count;
long previousMillis = 0;
long interval = 1000;

ISR(PCINT0_vect) {
  Count++;
}

void setup()
{
  Serial.begin(9600);
  Serial.println("Freq......");
  GIMSK = _BV(PCIE);    // Enable pin change interrupt Table 9.3.2
  PCMSK = _BV(PCINT4);  // Enable the interrupt for only pin 4,Table 9.3.4
}

void loop ()   {
unsigned long currentMillis = millis();
  if(currentMillis - previousMillis > interval) {
    previousMillis = currentMillis;   
    Serial.println("Count  ");
    Serial.println(Count);
    Count=0;
  }
} //loop

66  Using Arduino / Microcontrollers / Re: ATtiny85 communication with other MC - Help with deciding on: February 14, 2014, 05:03:03 am
For communication you could use TinyDebugSerial, it is part of the core you are using.
It works the same way as on the UNO and the syntax is the same:
So this would output Serial on pin PB3

Code:
void setup() {
Serial.begin(9600);
}

void loop() {
Serial.println("Testing..");
}


https://code.google.com/p/arduino-tiny/
67  Using Arduino / Microcontrollers / Re: attiny 2313 and servos on: February 12, 2014, 02:53:51 pm
tylernt has made a servo library for tinys:

http://forum.arduino.cc/index.php?topic=198337.msg1463365#msg1463365
68  International / Scandinavia / Re: Hjælp til water level sensor code on: February 11, 2014, 09:44:18 am
Hvis du har et ptentiometer, kan du bruge det til at teste med.
Det er sikkert også lettere og så ungår du vandpjaskeri:

http://arduino.cc/en/Tutorial/ReadAnalogVoltage

Har du et link til dine sensorer ?
69  Using Arduino / Microcontrollers / Re: Using a OneWire device with a ATtiny85 on: February 11, 2014, 09:17:34 am
That is strange !

I don't know if it matters but I run the ATtiny85 @ 8MHz.

This is how I define the pin connected to the sensor

Code:
OneWire  ds(3);  // on pin PB3 (a 4.7K resistor is necessary)
70  Development / Other Software Development / Re: An ATtiny core collection for IDE 1.5.3 (Aka. Nightly Build) on: February 11, 2014, 09:09:34 am



attiny84at16.upload.tool=arduino:arduinoisp
attiny84at16.upload.tool=avrispv2
attiny84at16.upload.tool=pololu
71  Using Arduino / Microcontrollers / Re: Using a OneWire device with a ATtiny85 on: February 10, 2014, 04:20:49 pm
Yes I am using an Arduino as programmer, with TinyISP

https://github.com/Coding-Badly/TinyISP

It makes debugging very easy

And I am using this core
https://code.google.com/p/arduino-tiny/
72  Using Arduino / Microcontrollers / Re: Using a OneWire device with a ATtiny85 on: February 10, 2014, 03:52:55 pm
I have used the latest version from the playground

http://playground.arduino.cc/Learning/OneWire

http://www.pjrc.com/teensy/td_libs_OneWire.html

I have the DS18B20 connected to pin 3 on the ATtiny85, and a 4.7kohm pullup resistor

This is the output

Code:
ROM = 28 B0 CE AF 2 0 0 E5
  Chip = DS18B20
  Data = 1 2E 1 4B 46 7F FF 2 10 38  CRC=38
  Temperature = 18.87 Celsius, 65.97 Fahrenheit
No more addresses.

Edit:
I used the DS18x20_Temperature sketch from the examples that comes width the library
73  Development / Other Software Development / Re: An ATtiny core collection for IDE 1.5.3 (Aka. Nightly Build) on: February 10, 2014, 02:52:02 pm
Did you rename Prospective Boards.txt to boards.txt  (and restart the IDE) ?
74  International / Scandinavia / Re: Hjælp til water level sensor code on: February 10, 2014, 01:14:19 pm
På din tegning har du skrevet at du bruger en Arduino Leonardo.
På den type bruges A2 og A3 som SDA/SCL til din RTC
75  Products / Arduino Yún / Re: Where can I find out about programming the Linino side of a Yun on: February 09, 2014, 06:28:48 am
Quote
For example, can you only access it using Wifi, or can you open a Linino terminal over a USB connection?

You can open a connection via LAN or or WIFI
I am a Windows user, so I use Putty to connect but there are similar programs for Unix.
When you have made the connection you will feel at home since you are used to Unix.

The preferred language seems to be Python and PHP, and for databases SQLite or MySQL.

Quote
The Yun has an SDcard slot, can that be used as a "hard disk" to store Linux software?

Yes and it is recommended to do so, as the flash ram has limited write cycles.

Quote
I haven't bought a Raspberry PI because I don't have a TV and, in any case, I already have a Linux computer. The Yun looks like it might be a better package of Linux and I/O. But if the Linux side is very limited I will continue to work just with my Uno or Mega.

I use the same technique with my Raspberry Pi.
The difference is that on the RPI you have acses to the GPIO from Unix, on the Yon  you can only access the GPIO from the onboard Arduino Leonardo. (They are conected threough the Serial)

The connection between the two sides is through the Bridge Library
Pages: 1 ... 3 4 [5] 6 7 ... 71