Code Monkey home page Code Monkey logo

attiny's Introduction

Upload mit Arduino Nano

Infos:

Vorgehen mit der ArduinoIDE:

  1. Arduino als Programmer einrichten:
    1. ATtiny nicht verbinden!
    2. 10µF-Kondensator zwischen GND und RST (hier nicht notwendig!)
    3. File → Examples → ArduinoISP wählen
    4. Arduino Nano Every als Board auswählen
    5. Baudrate im Serial-Monitor gleich BAUDRATE im Sketch setzen
    6. Tools → Registers Emulation → None (ATMEGA4809) wählen
    7. Fehler avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description ignorieren
  2. Programm für ATtiny hochladen
    1. ATtiny wie hier beschrieben verbinden (+0.1µF zwischen VCC und GND!)
    2. am Arduino 10µF-Kondensator zwischen GND und RST
    3. Sketch öffnen
    4. ATtiny als Board auswählen
    5. Tools → Processor → ATtiny84 (oder anderen)
    6. Tools → Programmer → Arduino as ISP
    7. Sketch → Upload using Programmer (Upload-Button geht nicht!)

Serielle Konsole via Arduino Nano

Sketch für ATtiny

  • wie oben beschrieben hochladen:

Sketch für Arduino

  • mit Sketch “ArduinoISP” funktioniert es nicht, daher anderen Sketch, z.B. Examples→Basic→Bare Minimum hochladen

Verbindung

(alles physische PIN-Nummern!)

ArduinoATtiny
3.3VPin 1 (VCC)
GNDPin 14 (GND)

serielle Konsolle mittels screen lesen

  • screen /dev/ttyACM0 19200

Infos vom ATTiny mittels avrdude

avrdude -P /dev/ttyACM0 -b19200 -c avrisp -p attiny84 -v

SoftwareSerial

  • Pin-IDs = Spalte “PlatformIO”
  • funktioniert

ATTinyCore

  • https://github.com/SpenceKonde/ATTinyCore
  • Anleitung
  • “Also, if using ATTinyCore, consider using the builtin soft serial, instead of SoftwareSerial (SoftwareSerial prevents you from using all PCINTs in exchange for being able to use any pin for RX, mine doesn’t interfere with PCINTs (uses the analog comparator interrupt instead - but pins are fixed)” Quelle
  • TX auf PA1 (Pin 12), RX auf PA2 (Pin 11)
  • funktioniert

TinyDebugSerial

#include "TinyDebugSerial.h"

int ledPin = 3; // = PA2

void setup() {
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}
void loop() {
  digitalWrite(ledPin, HIGH);
  Serial.println("blink");
  delay(500);
  digitalWrite(ledPin, LOW);
  delay(500);
}

LoRa

Nächste Schritte

  • Vom blink+serial-Sketch ausgehend Code hinzufügen:
    • Ausgabe Voltage
    • Schlafmodus
    • RFM95.init()
    • usw.

attiny's People

Contributors

rjoberon avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.