1) Go to micromegas installation and create a new project
$./newProject projectname
2) Edit project according to the instructions in micromegas and check the model (which should be placed in the projectname/work/models directory).
3) Rename the Makefile to MakefileMicromegas. Remove all other files in the projectname directory except for the subdirectories and the MakefileMicromegas file.
4) Copy a version of all the ScannerS files and directories into the projectname directory.
5) Copy the lines below the comments "#read compiler flags" and "#files to compile" from MakefileMicromegas into the ScannerS makefile, where the comment "# Paste MICROMEGAS makefile lines HERE!!! (if in use)"
6) Uncomment the line in ScannerSUser.cpp which includes the Micromegas headers
7) You should now be able to use the micromegas functions in the ScannerSUser.cpp user defined file (See examples).