关于 attiny 85 http://digistump.com/package_digistump_index.json下载错误

报错原因

显而易见,网络问题,attiny的包在github上
地址:https://github.com/ArminJo/DigistumpArduino
所涉及资源放在文末

解决历程

  • 科学上网 (个人一直使用的外网,且粘贴的开发板网址可以在浏览器打开,pass)
  • 清空缓存在这里插入图片描述在这里插入图片描述然并卵
    网上无外乎这两种方法,均无效,考虑离线安装

离线安装

原理:

1.arduino 在断网打开开发板管理器时会解析这里面的json文件
在这里插入图片描述
2.这里就是解析出来的东西
在这里插入图片描述
3.当你选择版本下载时,所需要的资源就会进入这个目录寻找
在这里插入图片描述
断网设置
在这里插入图片描述
无代理 == 有网
人工代理 == 断网

开始(断网下进行)

这是在官方的离线安装方法无效的前提下(git上有说明书)
1.官网(git)下载离线包,解压,找到这个文件放在这个目录,这里面就包含了attiny的所有资源地址
在这里插入图片描述
2.打开arduino,进入开发板管理器,由于是在离线模式,所以他就不会去网上下载该json文件了,会直接扫描这里的文件
在这里插入图片描述
3.这里已经扫描到相关信息了,选择版本下载,会报错(因为离线),根据报错信息(报错都是xxx下载失败),去寻找对那对应的包,一般都在attiny官方离线包中可以找到,总之就是它缺什么,我们下载什么,下载的文件放在原理2图中路径,如果提示还是找不到,关掉重启
ok,这样就可以了
注意:如果期间有包总是扫描不到,可以尝试我个人的投机方法

在第一步把json文件放入,在arduino中显示出对应的下载页面后,关掉开发板管理器,打开网络,然后再次进入开发板管理器下载,由于在有网的情况下,打开开发板管理器会联网下载索引更新Arduino15目录下的内容,有可能删除导入到json文件,所以为取巧,该方法必须科学上网

  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
下面是 `SoftwareSerial.h` 的代码: ```c++ /* SoftwareSerial.h - library for SoftwareSerial on AVR/Duemilanove or Arduino with ATMega168 chips (or others with USART0) Based on SoftwareSerial.cpp by ladyada Ported to STM32 Arduino Core by Martino Facchin <@martino-f> Ported to ESP8266 by Peter Lerup (@plerup) Ported to SAMD21 by Arduino LLC Ported to SAMD51 by Carlos Eduardo Morimoto (@cmorimoto) Ported to nRF52 by Adafruit Industries Ported to SAMD09 by Arduino LLC Ported to SAMD11 by Arduino LLC Modified by Paul Stoffregen <paul@pjrc.com> to support Teensy. https://github.com/PaulStoffregen/SoftwareSerial/blob/master/SoftwareSerial.h Modified by Sebastian Balzato to add support for ATtiny85. https://github.com/sebastian-balzato/SoftwareSerial/blob/master/SoftwareSerial.h Modified by Sandro Benigno to work with ATTinyCore and ATTiny85. https://github.com/sandrob/SoftwareSerialATTiny Modified by Sandro Benigno to work with ATTinyCore and ATTiny84. https://github.com/sandrob/SoftwareSerialATtinyX4 Modified by Sandro Benigno to work with ATmega4809. https://github.com/sandrob/SoftwareSerialATmega4809 Modified by Sandro Benigno to work with SAMD21 and SAMD51. https://github.com/sandrob/SoftwareSerialSAM Modified by Sandro Benigno to work with nRF52. https://github.com/sandrob/SoftwareSerialNRF52 Modified by Sandro Benigno to work with SAML21. https://github.com/sandrob/SoftwareSerialSAML21 Modified by Sandro Benigno to work with SAMD51 and Adafruit Grand Central. https://github.com/sandrob/SoftwareSerialSAMD51_GC Modified by Sandro Benigno to work with SAMC21 and Adafruit Metro M4 AirLift Lite. https://github.com/sandrob/SoftwareSerialSAMC21_M4_AirLift_Lite Modified by Sandro Benigno to work with SAMD21 and Adafruit Metro M4 AirLift Lite. https://github.com/sandrob/SoftwareSerialSAM_M4_AirLift_Lite Modified by Sandro Benigno to work with SAMD51 and Adafruit PyPortal. https://github.com/sandrob/SoftwareSerialSAMD51_PyPortal Modified by Sandro Benigno to work with SAMD51 and Adafruit PyGamer. https://github.com/sandrob/SoftwareSerialSAMD51_PyGamer Modified by Sandro Benigno to work with SAMD51 and Adafruit ItsyBitsy M4 Express. https://github.com/sandrob/SoftwareSerialSAMD51_ItsyBitsy_M4 Modified by Sandro Benigno to work with SAMD51 and Adafruit Feather M4 Express. https://github.com/sandrob/SoftwareSerialSAMD51_Feather_M4 Modified by Sandro Benigno to work with SAMD51 and Adafruit Metro M4 Express. https://github.com/sandrob/SoftwareSerialSAMD51_Metro_M4 Modified by Sandro Benigno to work with SAMD21 and Seeeduino XIAO. https://github.com/sandrob/SoftwareSerialSAMD21_XIAO Modified by Sandro Benigno to work with SAMD51 and SparkFun SAMD51 Thing Plus. https://github.com/sandrob/SoftwareSerialSAMD51_Thing_Plus Modified by Sandro Benigno to work with SAMD51 and Adafruit MagTag. https://github.com/sandrob/SoftwareSerialSAMD51_MagTag Created by David A. Mellis <dam@mellis.org> Modified to work with ATmega8 by M. Spiegelberg <michael@spiegelberg.de> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. NOTE: Interrupts are disabled on the RX pin when using this library. TIMING: The library has a resolution of 4 microseconds, i.e. the delay can be increased in 4us increments. Furthermore, the timing is related to the resolution of the micros() function on the board. For example, on most Arduino boards, the micros() timer has a resolution of 4us. */ #ifndef SoftwareSerial_h #define SoftwareSerial_h #include <Arduino.h> #include <inttypes.h> #include <Stream.h> /****************************************************************************** * Definitions ******************************************************************************/ #define _SS_MAX_RX_BUFF 64 // RX buffer size #define _SS_IDX_MASK (_SS_MAX_RX_BUFF - 1) /****************************************************************************** * Class ******************************************************************************/ class SoftwareSerial : public Stream { private: // per object data uint8_t _receivePin; uint8_t _transmitPin; uint16_t _rx_delay_centering; uint16_t _rx_delay_intrabit; uint16_t _rx_delay_stopbit; uint16_t _tx_delay; uint16_t _buffer_overflow:1; uint16_t _inverse_logic:1; // static data static uint16_t _rx_buffer_head; static uint16_t _rx_buffer_tail; static uint16_t _tx_buffer_head; static uint16_t _tx_buffer_tail; static uint8_t _tx_pin_mask; static uint8_t _rx_pin_mask; static volatile uint8_t * const _rx_port_register; static volatile uint8_t * const _tx_port_register; static uint8_t _buffer[_SS_MAX_RX_BUFF]; // RX circular buffer // private methods static inline void tunedDelay(uint16_t delay); uint8_t rx_pin_read(); void setTX(uint8_t transmitPin); void setRX(uint8_t receivePin); void enableRx(bool on); void enableTx(bool on); void recv() __attribute__((__always_inline__)); void tx_pin_write(uint8_t pin_state) __attribute__((__always_inline__)); void setTXinterrupt() __attribute__((__always_inline__)); void clearTXinterrupt() __attribute__((__always_inline__)); uint8_t tx_pin_read() __attribute__((__always_inline__)); public: // public methods SoftwareSerial(uint8_t receivePin, uint8_t transmitPin, bool inverse_logic = false); ~SoftwareSerial(); void begin(long speed); void end(); int read(); int peek(); size_t write(uint8_t byte); size_t write(const uint8_t *buffer, size_t size); operator bool() { return true; } using Print::write; // public only for easy access by interrupt handlers static inline void handle_interrupt() __attribute__((__always_inline__)); }; #endif ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值