Skip to content

Instantly share code, notes, and snippets.

"""
Animation of Elastic collisions with Gravity
author: Jake Vanderplas
email: [email protected]
website: http://jakevdp.github.com
license: BSD
Please feel free to use and modify this, but keep the above information. Thanks!
Some amendments made, code doesn't function 100% properly just yet
#include <util/crc16.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <SPI.h>
#include <avr/pgmspace.h>
#include "ax25modem.h"
int buzzer = 13;
int dit_pin = 2;
const int dit_delay = 50000;
void setup()
{
pinMode(buzzer, OUTPUT);
pinMode(dit_pin, INPUT);
attachInterrupt(0, dit, LOW); // uses pin 2 as external interrupt
current_identifier = 91
def generate_packet():
{
"metadata": {
"name": "Cutdown"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
#include <util/crc16.h>
#define RADIOPIN 9
#define LED_1 5
#define LED_2 6
#define BAUD_RATE 50 // change this value to desired baud rate
int counter = 0; // sentence id
int tx_status = 0;
char *ptr = NULL;
#include <avr/interrupt.h>
#include <avr/io.h>
#include <stdint.h>
#define RADIOPIN 9
volatile char *ptr = NULL; // pointer to datastring buffer
volatile boolean sentence_needed = true;
char send_datastring[100] = "";
#define AUDIO_PIN 6 // GPIO pin on si446x
volatile char *ptr = NULL; // pointer to datastring buffer
volatile boolean sentence_needed = true;
char send_datastring[100] = "";
volatile char *ptr = NULL;
/* for using RTTY */
volatile int tx_status = 0;
char currentbyte;
#include <avr/io.h>
#include <avr/interrupt.h>
#define RADIOPIN 9
volatile char *ptr = NULL; // pointer to datastring buffer
volatile boolean sentence_needed;
char send_datastring[100] = "";
#include <stdint.h>
#include <stdio.h>
unsigned char varicode[][3] = {
/* Primary alphabet */
{ 1,15, 9}, { 1,15,10}, { 1,15,11}, { 1,15,12}, { 1,15,13}, { 1,15,14}, { 1,15,15}, { 2, 8, 8},
{ 2,12, 0}, { 2, 8, 9}, { 2, 8,10}, { 2, 8,11}, { 2, 8,12}, { 2,13, 0}, { 2, 8,13}, { 2, 8,14},
{ 2, 8,15}, { 2, 9, 8}, { 2, 9, 9}, { 2, 9,10}, { 2, 9,11}, { 2, 9,12}, { 2, 9,13}, { 2, 9,14},
{ 2, 9,15}, { 2,10, 8}, { 2,10, 9}, { 2,10,10}, { 2,10,11}, { 2,10,12}, { 2,10,13}, { 2,10,14},
{ 0, 0, 0}, { 7,11, 0}, { 0, 8,14}, { 0,10,11}, { 0, 9,10}, { 0, 9, 9}, { 0, 8,15}, { 7,10, 0},