Posts Tagged ‘Editor’
26
mag

I prefer to use the Visual Studio 2008 environment to write and test code for the Arduino. The following steps outline what is necessary to accomplish this.

Note that this requires two files to be added that are stub’s for the normal Arduino functions. The stubs provided here use defines for the Arduino Mega and create a simple console application that will map console input/output to the Arduino serial input/output.

For those of you who have more time at hand, it would be nice to write a windows stub which will also allow to see / control the I/O pins.

If you need support for other boards you need to edit the VSPDE.h file.

Also the VSPDE.cpp file does not implement all the Arduino functions, so if you need more, please feel free to update the code.

Main objective for me was to be able to edit and compile, and in a limited way run and debug code using Visual Studio. This will do just that (and nothing more)!

Step 1: Ensure .pde files are seen as C++ files

Open regedit and under \HKEY_CLASSES_ROOT create a new key called “.pde” and change the default value to “cppfile”.

   [HKEY_CLASSES_ROOT\.pde]
   @="cppfile"

Step 2: Configure Visual Studio

  1. Under tools \ options \ Projects and Solutions\VC++ Project settings add ‘*.pde’ to ‘C/C++ File Extensions’ and ‘.pde’ to the ‘Extensions to Include’
  2. Under tools\options\Text Editor\File Extension add PDE and map it to the C++ editor
  3. Close Visual Studio to effect the changes

Step 3: Create a Visual Studio project

  1. Start by creating a new (empty) sketch using the Arduino editor
  2. Next create a Visual C++ ‘Empty Project’ for the sketch in the same folder
  3. In the solution, right click and select Add, Existing item to add the .PDE file(s)
  4. Select the .PDE files, right click and in the file properties set the file type to ‘C/C++ Code’
  5. Add the VSPDE.h and VSPDE.cpp files
  6. Add an #include statement for the VSPDE.h file in the .pde files.
  7. You can now edit, compile and run the program as a console application (without I/O support!)

Step 4: Configure Arduino

Under File\Preferences set the ‘Use external editor’ checkmark.
Now you can use Visual studio to edit and when done just Alt-Tab to the Arduino application and press the upload button to compile the latest code and upload it to the board. The Arduino program will automatically monitor for file changes so you do not need to refresh anything!

Rif: www.arduino.cc




FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , ,

28
gen

Hi all,
a large collection of tricks that you made with registry edit in your Windows Phone 7.
These are all hidden features, but simply editable from the registry directly from phone.

If you don’t have a unlocked phone with registry editor, read this article.
After that, read this one to read / write registry in WP7.
Rif: albertopasca.it

Here we goooooo:

Prevent Relock for ChevronWP7 unlocked device

1
2
3
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg]
    "PortalUrlProd"=""
    "PortalUrlInt"=""

OR

1
2
3
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg]
"PortalUrlProd"="127.0.0.1"
"PortalUrlInt"="127.0.0.1"

Enable Wifi 11n

1
2
[HKEY_LOCAL_MACHINE\Comm\BCMSDDHD1\Parms]
    "11nModeDisable"=dword:0

Caller ID issue fix

1
2
[HKEY_CURRENT_USER\ControlPanel\Phone]
"CallIDMatch"=dword:7

Live ID Activation Code
(Usefull on HD2 to bypass boring serial number step)

1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\GwpCPC]
  "ActivationCode"="R****-H****-I****-*7***-**8**"

Developer Unlock State

1
2
[HKEY_LOCAL_MACHINE\Comm\Security\LVMod]
    "DeveloperUnlockState"=dword:1





Unlock Hidden option in ease of access settings

1
2
3
4
5
[HKEY_LOCAL_MACHINE\System\Accessibility]
    "CompactMode"=dword:0
    "TTY"=dword:1
    "telecoil_UI"=dword:1
    "telecoil"=dword:1

Set AutoData

1
2
3
4
5
[HKEY_LOCAL_MACHINE\System\AutoDataConfig]
"RunADC"=dword:1
"ConfigurationStatus"=dword:0
"Attempt"=dword:0
"MaxAttemptsAllowed"=dword:3

Show 3G Toogle

1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\Connectivity\CellularCPL]
 "Show3GToggle"=dword:1

Add “never” option to Lockscreen screen time-out

1
2
[HKEY_LOCAL_MACHINE\ControlPanel\Lock]
"DisableNever"=dword:0

Rif: albertopasca.it

Disable System Logs for best performance (usefull on HD2)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Application]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Security]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\System]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-CellularLogPublisher-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-Dtpt-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-FacebookStatusEvent-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-Mtp-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-SharePoint-Notification-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-ShortMsgEtw-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-SNTransports-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-Commsync-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-SyncStatusEvent-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\EventLog\Channel\Microsoft-WindowsMobile-TelShell-ShellHistoryChannel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-UnifiedStorePublisher-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-RilDrvLogChannel-Channel]
"DefaultEnable"=dword:00000000
[HKEY_LOCAL_MACHINE\System\EventLog\Channel\Microsoft-WindowsMobile-ZTraceChannel]
"DefaultEnable"=dword:00000000

Cleartype settings

1
2
3
4
5
6
[HKEY_LOCAL_MACHINE\System\GDI\ClearTypeSettings\0409]
"ForceOff"=dword:1
"Enabled"=dword:0
"Quality"=dword:0
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\0409]
"ClearTypeText"=dword:1

System & Home Background color to grey (replace dark theme background color)

1
2
3
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1]
    "PageBackgroundColor"="#FF818181"
    "SysTrayBackgroundColor"="#FF818181"


keypad,keyboard background & menu color black (Restart needed to apply)

1
2
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1]
 "ChromeColor" value="#FF000000"

Famous on WM6 glyph cache entry

1
2
[HKEY_LOCAL_MACHINE\SYSTEM\GDI\GLYPHCACHE\0409]
    "limit"=dword:4000

Notification & sound volume

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[HKEY_CURRENT_USER\ControlPanel\Notifications\Vibrate]
"Enabled"=dword:0
[HKEY_CURRENT_USER\ControlPanel\Notifications\Message]
"Enabled"=dword:1
[HKEY_CURRENT_USER\ControlPanel\Notifications\Led]
"Enabled"=dword:1
"TimeOut"=dword:1e
[HKEY_CURRENT_USER\ControlPanel\Notifications\Sounds]
"Enabled"=dword:1
"Repeat"=dword:0
"Wave"="Alarm1"
[HKEY_CURRENT_USER\ControlPanel\Notifications\Default]
"LedRefCount"=dword:0
[HKEY_LOCAL_MACHINE\ControlPanel\Volume]
[HKEY_CURRENT_USER\ControlPanel\Volume]
"Key"=dword:2
"Screen"=dword:2
"Mute"=dword:7
"Volume"=dword:C666C666
"MaxSystemUIVolume"=dword:1E
"MaxInCallUIVolume"=dword:A
"MaxdBAtten"=dword:2D
"MinInCallVolume"=dword:1111

Unlock Hidden option in ease of access settings

1
2
3
4
5
[HKEY_LOCAL_MACHINE\System\Accessibility]
    "CompactMode"=dword:0
    "TTY"=dword:1
    "telecoil_UI"=dword:1
    "telecoil"=dword:1





Change default IE search engine
BING

1
2
3
4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]
    "DefaultScope"="Bing"
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\Bing]
"URL"="http://m.bing.com/search/search.aspx?mid=8015&LC=en-us"

GOOGLE

1
2
3
4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]
    "DefaultScope"="Google"
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\Google]
"URL"="http://www.google.com/m?hl=en&gl=us&client=ms-hms-tmobile-us&q={searchTerms}"

YAHOO

1
2
3
4
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes]
    "DefaultScope"="Yahoo"
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\SearchScopes\Yahoo]
"URL"="http://de.search.yahoo.com/search?p={searchTerms}"

Add url to IE new Tabs

1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\AboutURLs]
"tabs"="http://www.albertopasca.it"

Rif: albertopasca.it

ACCENT COLOR NAMES

1
2
3
4
5
6
7
8
9
10
11
12
13
HKEY_LOCAL_MACHINE\ControlPanel\Themes\AccentsDisp layName\0409]
"0"="Green" ;
"1"="Red" ;
"2"="Blue" ;
"3"="Orange" ;
"5"="Pink" ;
"6"="Brown" ;
"7"="Lime" ;
"8"="Teal" ;
"9"="Purple" ;
"10"="Magenta" ;
"11" = "Light blue";
"12" = "Dark blue";


LIGHT

1
2
3
4
5
6
7
8
9
10
11
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\0\Accents]
"0"=dword:FF339933
"1"=dword:FFE51400
"2"=dword:FF1BA1E2
"3"=dword:FFF09609
"5"=dword:FFE671B8
"6"=dword:FFA05000
"7"=dword:FF8CBF26
"8"=dword:FF00ABA9
"9"=dword:FFA200FF
"10"=dword:FFFF0097

DARK

1
2
3
4
5
6
7
8
9
10
11
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1\Accents]
"0"=dword:FF339933
"1"=dword:FFE51400
"2"=dword:FF1BA1E2
"3"=dword:FFF09609
"5"=dword:FFE671B8
"6"=dword:FFA05000
"7"=dword:FF8CBF26
"8"=dword:FF00ABA9
"9"=dword:FFA200FF
"10"=dword:FFFF0097

ADD MORE COLORS

1
2
3
4
5
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\AccentsDisplayName\0409]
"13"="Grey"
"14"="Light grey"
"15"="Black"
"16"="White"
1
2
3
4
5
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\AccentsDisplayName\0c0a]
"13"="Gris"
"14"="Gris claro"
"15"="Negro"
"16"="Blanco"
1
2
3
4
5
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\0\Accents]
"13"=dword:FF808080
"14"=dword:FFC0C0C0
"15"=dword:FF000000
"16"=dword:FFFFFFFF
1
2
3
4
5
[HKEY_LOCAL_MACHINE\ControlPanel\Themes\1\Accents]
"13"=dword:FF808080
"14"=dword:FFC0C0C0
"15"=dword:FF000000
"16"=dword:FFFFFFFF


ADD MORE THAN 10 UNSIGNED APPS

1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\DeviceReg\Install]
    "MaxUnsignedApp"=dword:7fffffff ; Allow max number of unsignd apps

VARIOUS

1
2
[HKEY_LOCAL_MACHINE\Software\Qualcomm\QosLib]
  "Enabled"=dword:0
1
2
[HKEY_LOCAL_MACHINE\Software\Microsoft\Camera\Settings]
  "ScreenOrientation"=dword:0
1
2
[HKEY_LOCAL_MACHINE\Software\Qualcomm\RIL\Options]
  "ExtendedSSInfo"=dword:0
1
2
3
4
5
6
[HKEY_LOCAL_MACHINE\Software\Microsoft\Connectivity\CellularCPL]
  "MakeDataConnectionExclusive"=dword:1
  "Show3GToggle"=dword:1
  "AutoNetwork"=dword:1
  "Roaming"=dword:0
  "CellDataOn"=dword:1
1
2
3
[HKEY_CURRENT_USER\ControlPanel\PhoneNetSelMode]
  "AlwaysShowGSMOperationModes"=dword:1
  "Option"=dword:0
1
2
[HKEY_LOCAL_MACHINE\Software\HTC\Proximity]
  "ProximityDetectStatus"=dword:0

NEVER LOCK SCREEN

1
2
    [HKEY_LOCAL_MACHINE\ControlPanel\Lock]
    "DisableNever"=dword:0

Enjoy as usual and be carefully!!!

Snippet from the web.

Rif: albertopasca.it





FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , , , , , ,

01
giu

E’ sempre bello vedere il proprio blocco note tutto colorato, con dei colori sensati ovviamente…

La volta scora abbiamo parlato di MIXAL e della sua sintassi colorata, e questa volta utilizzando l’assembly della cpu LC2 propongo per voi il syntax highlighting per UltraEdit v15/16++.





Basta andare sul menù:

Avanzate
-> Configurazione
-> Visualizzazione editor
-> Evidenziazione sintassi

ed aggiungerlo! Tutto qui, abbastanza semplice!

Ecco il codice da salvare / aggiungere alla lista:

1
2
3
4
5
6
7
8
9
10
11
12
13
/L20"Assembler LC2" ASMLC2_LANG Line Comment = ; Nocase Escape Char = \ String Chars = "' File Extensions = asm
/Delimiters = ~#!$@%^&*()-+=|\/{}[]:;"'<> , .?
/C1
add and
brz brp brn brnzp brzp blkw
end fill halt jsr jsrr
ld lea ldr ldi orig nop not
ret rti st sti str trap
/C2
# , .
/C3
R0 R1 R2 R3 R4 R5 R6 R7
x21 x23 x25

Da adesso in poi, ogni file .asm che contenga la sintassi dell’LC2 verrà visualizzato correttamente!





Volete fare una prova? Salvate il listato seguente .ASM ed apritelo con UltraEdit!

E’ un semplice programmino che conta i numeri positivi e i negativi da una lista di valori.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
   .orig x3000
   
conta lea r0, table
   and r2, r2, #0 ;contatore negativi
   and r3, r3, #0 ;contatore positivi
   
ciclo ldr r1, r0, #0 ;ciclo per trovare +/-
   brz fine
   brn isneg
   add r3, r3, #1
   brnzp next
   
isneg add r2, r2, #1
next add r0, r0, #1
   brnzp ciclo
   
fine trap x25

table .fill #100   ;array di elementi
   .fill #1
   .fill #5
   .fill #-6
   .fill #73
   .fill #0
   
   .end

enjoy.

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , ,

16
feb

Per scrivere programmi in MIXAL è possibile utilizzare un qualsiasi editor di testo.

Sarebbe bello e piacevole colorare il codice no?

Ecco per voi la versione .uew per UltraEdit versioni recenti (almeno 15).
Il file va salvato in “AppData\Roaming\IDMComp\UltraEdit\wordfiles” del vostro disco.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/L20"MIXAL" MIXAL_LANG Line Comment = * String Chars = " File Extensions = mix
/Colors = 0,8421376,8421376,8421504,255,
/Colors Back = 16777215,16777215,16777215,16777215,16777215,
/Colors Auto Back = 1,1,1,1,1,
/Font Style = 0,0,0,0,0,
/C1 KEYWORDS Colors = 16711680 Colors Back = 16777215 Colors Auto Back = 1 Font Style = 0
NOP
ADD FADD
SUB FSUB
MUL FMUL
DIV FDIV
NUM CHAR HLT
SLA SRA SLAX SRAX
SLC SRC
MOVE
LDA LD1 LD2 LD3 LD4 LD5 LD6 LDX
LDAN LD1N LD2N LD3N LD4N LD5N LD6N LDXN
STA ST1 ST2 ST3 ST4 ST5 ST6 STX STJ STZ
JBUS IOC IN OUT JRED
JMP JSJ JOV JNOV JL JE JG JGE JNE JLE
JAN JAZ JAP JANN JANZ JANP
J1N J1Z J1P J1NN J1NZ J1NP
J2N J2Z J2P J2NN J2NZ J2NP
J3N J3Z J3P J3NN J3NZ J3NP
J4N J4Z J4P J4NN J4NZ J4NP
J5N J5Z J5P J5NN J5NZ J5NP
J6N J6Z J6P J6NN J6NZ J6NP
JXN JXZ JXP JXNN JXNZ JXNP
INCA DECA ENTA ENNA
INC1 DEC1 ENT1 ENN1
INC2 DEC2 ENT2 ENN2
INC3 DEC3 ENT3 ENN3
INC4 DEC4 ENT4 ENN4
INC5 DEC5 ENT5 ENN5
INC6 DEC6 ENT6 ENN6
INCX DECX ENTX ENNX
CMPA FCMP CMP1 CMP2 CMP3 CMP4 CMP5 CMP6 CMPX
EQU
CON
ALF
ORIG
END

Per chi usa Crimson Editor invece, può usare questo file di specifica (mixal.spc) e questo per le parole chiave (mixal.key).

Riferimenti: Programmazione degli Elaboratori – Andrea Tettamanzi (UNIMI)

[ref -> albertopasca.it]

FacebookTwitterDeliciousLinkedInGoogle BookmarksNetlogGoogle GmailMySpaceGoogle ReaderShare

, , , , , , , ,

Switch to our mobile site