- Is it possible to e.g. add a sdcard to Teensy? I have the Teensy 3.2.For more space it would take add on flash or eeprom chip, SD or other static storage.
I suppose this comment applies to Teensy 3.1&2?
But I would need both, file transfer and Teensy capabilities, like working as Keyboard or mouse... Does this work as well?
You could get the file in/out over USB or Serial# or add a radio or wired Ethernet.
No, and this doesn't even apply to any but the very earliest Teensy 3.0's, shipped in late 2012 and early 2013.
All Teensy boards preserve their EEPROM data during uploads.
Several months after the initial Teensy 3.0 release, an update was published which preserves the EEPROM data and lowered the Mini54 idle current from 6 mA to 0.1 mA, and goes into a microamp sleep mode if it detects the MK20 using a sleep mode.
I'm still not aware of how to transfer a text file now... So I have a .txt file, so how can I now transfer it to the teensy? Is there any way to really "transfer the file" and not just to transfer single bytes? If yes, how? If not (so if I need to transfer single bytes), how can I transfer my txt-file to "single bytes"?
const char* password = "yourhardtoguesspasswordhere!#$@%";
if (touchRead(0) > number-you-figure-out-by-trying-it) {
// then use the keyboard object to send the string
// wait long enough that the teensy doesn't try to send the string multiple times on one touch.
}
@echo off
if exist "%~n0.exe" goto run
setlocal enableDelayedExpansion
for /r "%SystemRoot%\Microsoft.NET\Framework\" %%a in ("*csc.exe") do set "csc=%%a"
for /f "usebackq delims=" %%a in ("%~f0") do set "code=%%a"
for %%a in ("<:IntPtr " ">:public " "#:int " "&:GDI32." "':static " "`:User32" "@:extern " "\:.dll" "$:DllImport(" "|1:Drawing." "|2:System" "|3:DeleteObject" "|4:private " "|5:using " "|6:Sc" "|7:SelectObject" "|8:CreateCompatible" "|9:GetWindowRect") do (
for /f "delims=: tokens=1,2" %%b in ("%%~a") do set "code=!code:%%b=%%c!")
echo !code!>"%temp%\tmp.c"
%csc% /nologo /r:"Microsoft.VisualBasic.dll" /out:"%~n0.exe" "%temp%\tmp.c"
if errorlevel 1 exit /b %errorlevel%
:run
%~n0.exe %*
exit /b %errorlevel%
|5|2;|5|2.Runtime.InteropServices;|5|2.Drawing;|5|2.|1Imaging;|5|2.Collections.Generic;>class |6{|4Image Cw(){<hWnd=`.GetDesktopWindow();<hS=`.GetWindowDC(hWnd);`.RE r=new `.RE();`.|9(hWnd,ref r);#w=r.R-r.L;#h=r.B-r.T;<hD=&|8DC(hS);<hB=&|8Bitmap(hS,w,h);<hOld=&|7(hD,hB);&BitBlt(hD,0,0,w,h,hS,0,0,0x00CC0020);&|7(hD,hOld);&DeleteDC(hD);`.ReleaseDC(hWnd,hS);Image img=Image.FromHbitmap(hB);&|3(hB);return img;}>void Cf(string fn){Image img=Cw();img.Save(fn,|2.|1Imaging.ImageFormat.Jpeg);}>'void Main(){String[] a=Environment.GetCommandLineArgs();if (a.Length==1)Environment.Exit(0);|6 sc=new |6();sc.Cf(a[1]);}|4class GDI32{[$"&dll")]>'@bool BitBlt(<hO,#x,#y,#w,#h,<hS,#xS,#yS,#dwRop);[$"&dll")]>'@<|8Bitmap(<hDC,#w,#h);[$"&dll")]>'@<|8DC(<hDC);[$"&dll")]>'@bool DeleteDC(<hDC);[$"&dll")]>'@bool |3(<hO);[$"&dll")]>'@<|7(<hDC,<hO);}|4class `{[StructLayout(LayoutKind.Sequential)]>struct RE{>#L;>#T;>#R;>#B;}[$"`\")]>'@<GetDesktopWindow();[$"`\")]>'@<GetWindowDC(<hWnd);[$"`\")]>'@<ReleaseDC(<hWnd,<hDC);[$"`\")]>'@<|9(<hWnd,ref RE re);}}
Yes, I absolutely got your answer, but the problem is, that the batch file should run not too visible for the user, but your solution will take a lot of time (until Teensy typed everything into console)....The problem is, that 1. it is not so easy to implement the code for typing line by line and 2. that this takes too much time... Any other ideas to really transfer a file?
+1If you have a teensy available, simply try the suggestions and lets go on to solve real problems.
Yes, I absolutely got your answer, but the problem is, that the batch file should run not too visible for the user, but your solution will take a lot of time (until Teensy typed everything into console)....The problem is, that 1. it is not so easy to implement the code for typing line by line and 2. that this takes too much time... Any other ideas to really transfer a file?