Questions tagged [teensy]

The Teensy is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects.

The Teensy is a complete USB-based microcontroller development system, in a very small footprint, capable of implementing many types of projects.
All programming is done via the USB port.
No special programmer is needed, only a standard "Mini-B" USB cable and a PC or Macintosh with a USB port.

Home page: https://www.pjrc.com/teensy/

155 questions
0
votes
2 answers

I2C MCP3221 12 bit ADC reading 0 at any voltage

I've hooked up an MCP3221 to a Teensy 3.1 on the I2C bus and connect it to Vref(3.3V), just to check if it's working. However it's reading 0, even when I hook it up to a different voltage. Is my code faulty or should I just get a new…
pshao
  • 1
  • 2
0
votes
1 answer

The com port of my Teensy disappears after working fine for about a minute

I have a simple BMP180 sensor breakout board communicating with my Teensy device through I2C. My sketch simply print out the values that it reads. When I open serial monitor (which only works half the time), it works fine for about a minute, but…
pshao
  • 1
  • 2
0
votes
5 answers

Increasing an integer through a time delay

I'm producing a game in C on a microprocessor. The score is controlled by how long you can survive; the score increases by 1 every 3 seconds. The score is an integer which is declared globally, but displayed from a function. int score = 0;//globally…
James
  • 57
  • 1
  • 1
  • 4
0
votes
1 answer

How to place boundaries on the area a sprite can be drawn on an LCD

I'm working on a microprocessor with an LCD screen, and i'm writing code which randomly displays some sprites. void setup_sprite() { Sprite sprite[8]; Sprite * sprite_pointer = &sprite; byte sprite_bitmap [] = { BYTE( 10100000 ), BYTE( 01000000…
James
  • 57
  • 1
  • 1
  • 4
0
votes
1 answer

What's wrong with my print_random_sprites function?

I'm writing some code in C that randomly displays sprites on an LCD screen on a microprocessor. Currently when I run this code it produces 8 lines running from the top to bottom. So it's printing something in random order but not the sprite. Why is…
0
votes
0 answers

Using a for loop to display sprites randomly?

So im trying to write some code that displays 5 sprites randomly on an lcd screen on a microprocessor (teensy). I've already taken care of simulating randomness with seeding on a button press; void seedwithButtonPress() { DDRB |=…
0
votes
2 answers

Changing direction of moving sprite by 90 degrees upon button press acting strangely

I am developing a small game on a microprocessor, and I'm trying to get a function which changes the direction a sprite is moving by 90 degrees either left or right dependent on the left button press, or right button press. Currently this is my…
0
votes
1 answer

Clarification on skeleton code for C graphics library

I'm studying C and I've been given this code which draws a single line of pixels: void draw_line(unsigned char x1, unsigned char y1, unsigned char x2, unsigned char y2) { // Insert algorithm here. if (x1 == x2) { //Draw Horizontal line …
0
votes
1 answer

ARM Cortex M4 (teensy 3.1) inline assembly constraints

When compiling this code void FastRead() { register uint32_t cnt = 1000, sample; register uint8_t *dst = data; asm volatile( "loop1:" "ldr %[sample], [%[src]]\n\t" "strb %[sample], [%[dst], #1]!\n\t" …
0
votes
1 answer

Teensy 2.0 / Atmega32u4 as Keyboard: Send and Receive

I'm currently working on a device which is able to work as a keyboard and communicate via Serial with a self-written software. Now I have to install serial drivers (from Arduino) on different computers if I want to communicate with my application…
Marco
  • 1
0
votes
2 answers

Teensy + IR camera + OpenCV

I have never ever asked this kind of question on StackOverflow before, and I wonder if you could help me guys because it is a "bit" vague. I have to design a project that uses Teensy (simple ARM platform) for getting data from IR camera (Flir,…
Martin G
  • 268
  • 1
  • 3
  • 20
0
votes
1 answer

Teensy to imitate a USB bulk data transfer

I've purchased a teensy 3.0 in the hope I can use it to imitate the USB bulk transfer from another piece of hardware. I am developing some software to read and process the data coming over USB in a bulk transfer But I am trying to do this prior to…
bph
  • 10,728
  • 15
  • 60
  • 135
0
votes
1 answer

Read Input on Pin (Teensy)

I'm starting to play around with a Teensy 2, as well as learning C code. Currently I'm trying to figure out how to have a pin setup as an input. My code is as follows: #include #include #include…
0
votes
1 answer

Use same pin for interrupt and object

I have one pushbutton (and a rotary encoder) in a Teensy 3.1 (ARM) project. All is well except I'm having issues with putting it to sleep. Everything is working the first time after a reset, but each time after that, attachInterrupt() appears to not…
Alex Shroyer
  • 3,499
  • 2
  • 28
  • 54
0
votes
2 answers

USB dongle that will send keystrokes as soon as it is installed

I'm looking for a device to use at work when logging into windows systems. I configure systems for a living and the majority of these need a password to log into and all of them use long or complex password that are just a pain to type in especially…