We propose a micromachined VCSEL and an optical filter with a strain control layer, which enables wavelength tuning induced by local heating in a cantilever structure. We present a possibility of a large tuning range of over 100nm. Experimentally, we demonstrate both negative tuning and positive tuning of micromachined GaAlAs/GaAs filters. Also, we demonstrate a temperature insensitive filter with a temperature coefficient of 0.01 nm/K and a 4×4 multi-wavelength filter array in addition with wavelength trimming of over 20nm.