Questions tagged [teensy]

Teensy is a cheap and powerful development board with some Arduino compatibility.

Filter by
Sorted by
Tagged with
0
votes
0answers
37 views

How to write analog signals to control throttle of the ship?

I am using teensy 2.0 as DAC. I am trying to write signals on rudder and throttle of the ship via relay. How can I write these analog signals? Should I specify voltage for every pin? Here is my code: ...
0
votes
1answer
29 views

Teensy 2.0 MIDI: Number of notes in a chord limited to 6?

I am using the Teensy 2.0 with USBMidi in a project that allows musicians to use retro computers as "instruments" (https://github.com/fredlcore/midijoy). So far, all these computers had no more than ...
0
votes
1answer
40 views

Why can the Xbox360 not detect the Arduino Leonardo as keyboard?

Arduino Leonardo as keyboard in the computer works! But not with the Xbox360. The Teensy works perfectly on the PC but how to emulate a keyboard device for the Xbox360. I know the Xbox360 has ...
-1
votes
1answer
89 views

Reading bmp images from SD card, converting it and displaying it on serial monitor in Arduino

Can someone please help me write code that can read a 24-bit BMP file from an SD card, save converted to 8-bit BMP internally, and display the 8-bit BMP pixel values on Arduino terminal as a 2D matrix....
0
votes
1answer
41 views

Crazy Results with I2C and I2C_Anything()

I have the following code in a Arduino Mega function to retrieve two 4-byte integers from a Teensy 3.2. Wire.requestFrom(SLAVE_ADDR, sizeof(float)+ 2*sizeof(long)); mySerial.printf("\n<<<<...
0
votes
1answer
97 views

Sending MIDI CC to multiple midi Channel

Hi so i would like to send CC messages to different MIDI Channel (volume control). The CC messages are coming from one knob. The solution i found kind of work but i'm pretty sure is not ideal and ...
0
votes
1answer
206 views

how can i conect a lipo charger to a teensy 4.0?

I have the battery charger product https://www.adafruit.com/product/2124 and a teensy 4.0, that I would like to use to power it. what, if any pin would I connect from bat, to the teensy? Its my ...
2
votes
2answers
79 views

Is it possible to program Arduino in transpiled JavaScript?

Coming from JS, I find it very difficult to program Arduino in C++ (not even knowing which version or what features are supported), being bound to the loop and delay, not being able to (easily) use ...
1
vote
1answer
140 views

What is the equivilent of PORTx for Teensy (4.0)?

I've seen people use code like PORTB |= 0x1 << 6 to set the sixth bit of PORTB in arduino. I understand that this is significantly faster than using digitalWrite. How can this be done using a ...
0
votes
1answer
126 views

Faster TimerOne with Teensy 4.0 (600MHz)

I have a teensy 4.0 which runs at 600MHz, and is double superscaler (i.e. can execute two instructions per clock cycle, sometimes). I need an interrupt to happen faster than every microsecond. I've ...
0
votes
0answers
32 views

Why is my “port” button on the toolbar greyed out?

I am trying to program a Teensy 3.2 to act as a lightsaber controller. My code works perfectly but I can't select a port. How should I fix this problem? Here is my code: /* Presented without ...
0
votes
1answer
58 views

What would cause a delay when using serial between the Arduino IDE & external clients?

I have been working on a problem for a couple of days that I can't figure out. I am using a Teensy3.6 with Arduino IDE to build a CAN Bus monitor for a car. For those familiar, I am trying to save ...
1
vote
1answer
173 views

Baudrate is set to 9600 automatically even if specifying a different value

You initialize the serial communication via USB with Serial.begin(baudrate); where baudrate is a long specifying the number of symbols you want to send over the connection per second. You can put ...
0
votes
0answers
11 views

Xbee and Teensy LED Communication

I am attempting to send serial data from my Xbee on the XCTU software to the teensy to blink an LED on pin 13. The specific teensy I am using is a teensy LC. The Xbee I am using is a series 1 pro. I ...
0
votes
1answer
223 views

Specific ports on Teensy 3.6 not reading correct bit resolution using ADC library?

I have a basic circuit, where I'm reading analog values from 14 infrared receivers. I set the bit resolution to 16 but specific ports are returning 10 bit values (from 0 - 1024) instead of 16 bit ...
0
votes
0answers
19 views

VS2019CE/VisualMicro project won't compile without specific reference

I have a small project to test a Sparkfun MPU9250 breakout board. 'Class_MPU9250BasicAHRS_t3.h', 'MPU9250BasicAHRS_t3.h' and 'Class_MPU9250BasicAHRS_t3.cpp' are all in the local project folder. ...
0
votes
0answers
143 views

Can't open serial monitor on Ubuntu (Teensy 3.2)

I am running a simple blink/hello world program on Teensy 3.2. The code is compiling and running fine but I can't see the serial output. When I try to open the serial monitor it gives me "Board at ...
0
votes
1answer
139 views

Python script not reading from serial unless teensy is rebooted

I want to send some analog sensor data from a Teensy 3.2 to a mac running a python script (I am using the usual pyserial module and I send data using Serial.print() in the arduino sketch). I am using ...
1
vote
1answer
66 views

Parsing and comparing strings on Arduino: different behaviour from gcc?

I am trying to parse a simple string, print the result of the parsing via serial.println, and trigger a function on the basis of the received command. I wrote the code below, which perfectly works in ...
0
votes
0answers
263 views

Fastest way to convert binary string to a number?

I am using a Teensy 3.2 board as control logic for an ADC that I am building for teaching purposes. Currently, I am employing an attachInterrupt() to detect the rising edge of an external clock pulse ...
0
votes
0answers
239 views

Optimizing Teensy 3.6 for data sampling?

So, I have a very basic project where I cycle through 8 IR individual transmitters. After setting the individual transmitter high, I cycle through all 8 IR receivers and print their values, RX_CYCLES ...
-1
votes
1answer
203 views

Sending double data from Matlab to the Teensy 3.6 via the microUSB

I've been hitting against a wall for over a week now. My current project is to use a Teensy 3.6 to send data over an SPI bus to a chip which is effective going to be a signal generator. I've made a ...
0
votes
1answer
124 views

What's going wrong with my EEPROM?

I've been chipping away at a project for a long time now and I've found a serious bug. Basically the user has an 8x8 grid, and each cell in this grid has a number of properties. I want to be able ...
0
votes
1answer
55 views

Teensy not pulling down despite digitalWrite(x,LOW)

I'm trying to switch a ATX PSU on and off by serial command. My code is as follows: #include <Arduino.h> #define PIN_LOW_FOR_POWER PIN_F0 void setup() { Serial.begin(115200); } void loop() {...
0
votes
0answers
585 views

5V MCP2515 to 3.3V Teensy. How to reduce the MISO voltage

So to try and speed up my project, I have moved from using two UNO's to a UNO on the receive side, and teensy 3.6 on the sender side. However, no dice. The UNO doesn't receive any data or even try to ...
0
votes
0answers
118 views

Teensy freezing when reading ir sensor

I have a teensy that controls a motor and reads from a ir sensor, GP2Y0E02b. The issue i run into is that at random times the teensy seems to freeze, the main code stops printing but the interrupt ...
1
vote
1answer
151 views

Sanity check for dual IR LED circuit [closed]

If the intent is to drive the two LED's with 200-400mA (using PWM @ 38Hz), is there anything wrong with this solution? Perhaps this is a better solution, as it ensures the current is exactly the same ...
0
votes
1answer
366 views

Teensy 2.0 usb xinput device

So I came across a library that lets you turn your TeensyLC/3.X into an xinput device. I only have a 2.0 on hand. I spend the past few hours messing around with the LC example to see if I could hack ...
2
votes
1answer
207 views

How can I detect which baudrate a virtual COM port is set to?

I would like my software running on Leonardo to behave differently depending on the baudrate of the USB Serial set by the PC. For example, I want to make a smart USB to UART converter which performs ...
0
votes
3answers
94 views

Read analog port set as output

I have a PWM analog port that is outputting a frequency, is it possible to do an analogRead on the same pin and get a correct value? If so, will reading that port disrupt the freq output on the pin? ...
1
vote
1answer
94 views

Software Gate on a PWM port

I'm using a PWM port and outputting a freq. Is it possible to pulse the PWM port using software to simulate a pulse gate. For example, I'd like to output a freq of 111hz, but would like to gate that ...
2
votes
1answer
2k views

C++ Undefined reference to 'Class:Function()'

I have these files: Project.ino Sensor.h Sensor.cpp IMU/L3G.h IMU/L3G.cpp Sensor.h #ifndef Sensor_h #define Sensor_h #include <EEPROM.h> #include "IMU/L3G.h" #define CUTOFF_FREQ 30 #define ...
-1
votes
4answers
5k views

How to find the index of the maximum value in an array? [closed]

Say we have an array named myMeasurements int myMeasurements[9]={3,4,8,12,7,2,1,67,8}; How can I find the index of the maximum element of this array? For example the MATLAB code would be: ...
0
votes
2answers
446 views

Inaccurate PWM Signal Frequency and Timing

I have a Teensy 3.2 and I am using the Arduino IDE to program it. I am trying to generate 8 pulses with the frequency of 40 kHz and this needs to be repeated every second. I have written 3 different ...
0
votes
2answers
495 views

Using Teensy 3.5 (Arduino) to produce USB and Hardware MIDI messages simultaneously. Help?

Currently trying to get a teensy 3.5 to spam a series of notes in a loop over USB and hardware serial, which I am pretty sure it can do. I have a MIDI circuit set up as per the specifications here: ...
0
votes
1answer
578 views

Error compiling to teensy 3.6

Problem: In short, the Arduino IDE won't compile a sketch for the Teensy 3.6. It gives the error: exec: "A:\\arduino-1.8.5\\hardware\\teensy/../tools/teensy_post_compile": file does not exist Error ...
0
votes
2answers
407 views

Running dual Adafruit GPS at 10Hz on a Teensy 3.2

Excuse the crudity of this question but I'm having quite the trouble trying to run the two Adafruit Ultimate GPS v3 modules at 10Hz on the Teensy 3.2 board. The modules are connected over the hardware ...
1
vote
1answer
224 views

Teensy 2.0 with MCP23017-E

I've recently bought two more MCP23017-E's for a project, but after hooking them up to my Teensy 2.0 I couldn't get them to react to anything. Suspecting faulty hardware, I hooked them up to an old ...
0
votes
0answers
677 views

trouble running i2c and spi at the same time

I know this question has been asked before but I am having trouble running I2c and SPI at the same time. I am attaching my code below. The problem when I run the code is that the LED's don't blink ...
0
votes
0answers
35 views

How to upload data to program over USB port

I am working on a set of Visual poi (like these https://lighttoys.cz/store/vpoi/v4/) and need to upload new pictures to the controllers every now and again. Currently I use a program to convert a ...
0
votes
1answer
705 views

Selecting different arrays using a list of pointers

I have different arrays of different sizes, and a list of pointers to the addresses of each array. How do I select each array using the list of pointers, and access it's elements. On Teensy 3.2 board. ...
0
votes
1answer
88 views

Infinite Loop on Pin Input (Teensy 3.1)?

I have an infinite loop issue that keeps persisting in this code on my Teensy 3.1. This program is intended to take an input on Pin 0 and press the Enter key on the computer it is hooked into. It is ...
0
votes
1answer
72 views

Parsing sd card file to polymorphic objects

I am trying to read a file from sd card and parse them to polymorphic objects, then have an array of pointers to them so i can access them later. I was wondering what the best format would be to save ...
0
votes
2answers
414 views

Arrays, and for loops… faster to use together, or not to use?

I'm a 4th year EE undergrad, so I'm more of a hardware guy than software. But concerning best programming techniques, is it "better" (more efficient/and/or equally effective) to use for loops when ...
1
vote
2answers
214 views

Avoiding false rising and falling edge when using demultiplexer

I have 8 sets of 8 push buttons. There is a Teensy and a demultiplexer. The demultiplexer has 8 outputs. When an output is selected it is pulled low. Each output is connected to a group of 8 push ...
0
votes
1answer
469 views

Error Compiling to Board Teensy LC

I wrote a simple switch program using a teensy LC and transistors, but the Arduino compiler will not compile for the Teensy LC. And not for just my program, but any program, including the example ...
2
votes
1answer
125 views

TEENSY 3.2 RS-232 throughput

I have an application where I need 4 serial ports - 3 will be sending and receiving. The packet size will be up to 255 bytes on these 3 "main" ports. The 4th port will be receive only, and its ...
0
votes
1answer
53 views

Feasability question

I have some experience with Arduino, but not (yet) with other AVRs or Raspberry/Orange. I want to make a project with some slave devices (mostly Arduino Unos, one Arduino Mega). These all need to ...
1
vote
1answer
489 views

65 hall effect sensors as switches to be used as a keyboard with a teensy

I'm trying to wire up a silly little keyboard using hall effect sensors and magnets in a glove. The idea being only I can use the keyboard since I'll have the glove. The sensors are 3 pin, (vcc, gnd,...
0
votes
2answers
781 views

Where is Arduino on Fedora?

I am trying to install the Teensy loader software but I need to know where Arduino is installed. Does anyone know where in Fedora the Arduino files are?